checked iptables variant for multiple operating systems

This commit is contained in:
2024-08-19 16:04:30 +02:00
parent 6570137e42
commit f9022cbdff
2 changed files with 10 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
FROM base-firewall-1.8.7
MAINTAINER gyurix
FROM alpine
RUN apk add --update --no-cache iptables iptables-legacy openssl jq curl ca-certificates busybox-extras
COPY firewall/ /firewall/
CMD firewall/iptables-wrapper-installer.sh && /firewall/firewall-add

View File

@@ -347,7 +347,13 @@ echo 1 > /proc/sys/net/ipv4/ip_forward
##############################
IPTABLES="/sbin/iptables"
if /sbin/iptables-legacy -L |grep DOCKER-USER ; then
IPTABLES="/sbin/iptables-legacy";
else
IPTABLES="/sbin/iptables";
fi
###############################