fix: use iptables-nft if nftables is loaded
This commit is contained in:
parent
2a6e6a1e24
commit
fa32608c61
7 changed files with 35 additions and 0 deletions
|
|
@ -5,6 +5,11 @@
|
|||
echo "Container startup"
|
||||
#ifconfig eth0:0 $SERVER_IP_ADDRESS netmask 255.255.255.255 up
|
||||
|
||||
# check if nf_tables is loaded
|
||||
if lsmod | grep -qw nf_tables; then
|
||||
ln -sf /sbin/xtables-nft-multi /sbin/iptables
|
||||
fi
|
||||
|
||||
iptables -A INPUT -i lo -j ACCEPT
|
||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
iptables -A INPUT -p icmp -j ACCEPT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue