refactor: update-alternatives in prepare step
This commit is contained in:
parent
fa32608c61
commit
924fda7c80
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue