refactor: update-alternatives in prepare step

This commit is contained in:
Peter Galonza 2025-03-29 23:01:01 +03:00
parent fa32608c61
commit 924fda7c80
No known key found for this signature in database
GPG key ID: C85D94460DBECFA2
2 changed files with 5 additions and 5 deletions

View file

@ -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 \ --opt com.docker.network.bridge.name=amn0 \
amnezia-dns-net;\ amnezia-dns-net;\
fi fi
# check if nf_tables is loaded
if lsmod | grep -qw nf_tables; then
sudo update-alternatives --set iptables /usr/sbin/iptables-nft
fi

View file

@ -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 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 sudo iptables -C INPUT -p icmp --icmp-type echo-request -j DROP || sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP