diff --git a/client/server_scripts/prepare_host.sh b/client/server_scripts/prepare_host.sh index 1cc56a01..1f176c8c 100644 --- a/client/server_scripts/prepare_host.sh +++ b/client/server_scripts/prepare_host.sh @@ -7,3 +7,8 @@ if ! sudo docker network ls | grep -q amnezia-dns-net; then sudo docker network --opt com.docker.network.bridge.name=amn0 \ amnezia-dns-net;\ fi + +# check if nf_tables is loaded +if lsmod | grep -qw nf_tables; then + sudo update-alternatives --set iptables /usr/sbin/iptables-nft +fi \ No newline at end of file diff --git a/client/server_scripts/setup_host_firewall.sh b/client/server_scripts/setup_host_firewall.sh index 2108b226..605de511 100644 --- a/client/server_scripts/setup_host_firewall.sh +++ b/client/server_scripts/setup_host_firewall.sh @@ -1,8 +1,3 @@ -# check if nf_tables is loaded -if lsmod | grep -qw nf_tables; then - sudo update-alternatives --set iptables /usr/sbin/iptables-nft -fi - sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -C INPUT -p icmp --icmp-type echo-request -j DROP || sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP