Browse Source

Добавил правила firewall

Tomishinets Vladimir 2 years ago
parent
commit
ee07e76ba2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      docker-entrypoint.sh

+ 2 - 0
docker-entrypoint.sh

@@ -20,9 +20,11 @@ then
     {
       ip addr del ${ip}/24 dev ${dev}:ovpn
       iptables -D FORWARD -m state --state NEW -s ${client_net} -i external -j DROP
+      iptables -D FORWARD -s ${client_net} -d ${client_net} -i external -j DROP
     }
     ip addr add ${ip}/24 brd + dev ${dev} label ${dev}:ovpn
     iptables -I FORWARD 1 -m state --state NEW -s ${client_net} -i external -j DROP
+    iptables -I FORWARD 1 -s ${client_net} -d ${client_net} -i external -j DROP
     exec "/usr/sbin/openvpn" "--config" "/etc/openvpn/ovpn.conf" "$@" &
     wait
   else