diff options
author | Christian Rößler | 2015-03-26 15:54:58 +0100 |
---|---|---|
committer | Christian Rößler | 2015-03-26 15:54:58 +0100 |
commit | 5e193e5aab507f7bf09780040e3d1fcdbe0f6e34 (patch) | |
tree | 3b6a495aedd49b07e6013536144e1a0243d7b220 | |
parent | [alsa] REQUIRED_INSTALLED für opensus[alsa] REQUIRED_INSTALLED für opensuse (diff) | |
download | tm-scripts-5e193e5aab507f7bf09780040e3d1fcdbe0f6e34.tar.gz tm-scripts-5e193e5aab507f7bf09780040e3d1fcdbe0f6e34.tar.xz tm-scripts-5e193e5aab507f7bf09780040e3d1fcdbe0f6e34.zip |
[netpoint-lightdm] guest scripts: path to iptables binary re-set
-rwxr-xr-x | remote/modules/netpoint-lightdm/data/usr/local/bin/guest-cleanup | 10 | ||||
-rwxr-xr-x | remote/modules/netpoint-lightdm/data/usr/local/bin/guest-setup | 26 |
2 files changed, 20 insertions, 16 deletions
diff --git a/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-cleanup b/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-cleanup index 7bd7f219..32179cec 100755 --- a/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-cleanup +++ b/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-cleanup @@ -1,6 +1,8 @@ #!/bin/sh -/usr/bin/iptables -F -/usr/bin/iptables -P INPUT ACCEPT -/usr/bin/iptables -P FORWARD ACCEPT -/usr/bin/iptables -P OUTPUT ACCEPT +IPTABLES=$(/usr/bin/which iptables) + +"$IPTABLES" -F +"$IPTABLES" -P INPUT ACCEPT +"$IPTABLES" -P FORWARD ACCEPT +"$IPTABLES" -P OUTPUT ACCEPT diff --git a/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-setup b/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-setup index 3f9e2293..cb6791fc 100755 --- a/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-setup +++ b/remote/modules/netpoint-lightdm/data/usr/local/bin/guest-setup @@ -1,23 +1,25 @@ #!/bin/sh +IPTABLES=$(/usr/bin/which iptables) + # reset -/usr/bin/iptables -F INPUT -/usr/bin/iptables -F FORWARD -/usr/bin/iptables -F OUTPUT +"$IPTABLES" -F INPUT +"$IPTABLES" -F FORWARD +"$IPTABLES" -F OUTPUT if [ "x${USER}" = "xdemo" ]; then # filter out the internetz - /usr/bin/iptables -P INPUT DROP - /usr/bin/iptables -P FORWARD DROP - /usr/bin/iptables -P OUTPUT DROP + "$IPTABLES" -P INPUT DROP + "$IPTABLES" -P FORWARD DROP + "$IPTABLES" -P OUTPUT DROP # block internetz - /usr/bin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT - /usr/bin/iptables -A OUTPUT -d 132.230.0.0/16 -j ACCEPT - /usr/bin/iptables -A OUTPUT -d 10.0.0.0/8 -j ACCEPT + "$IPTABLES" -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT + "$IPTABLES" -A OUTPUT -d 132.230.0.0/16 -j ACCEPT + "$IPTABLES" -A OUTPUT -d 10.0.0.0/8 -j ACCEPT else - /usr/bin/iptables -P INPUT ACCEPT - /usr/bin/iptables -P FORWARD ACCEPT - /usr/bin/iptables -P OUTPUT ACCEPT + "$IPTABLES" -P INPUT ACCEPT + "$IPTABLES" -P FORWARD ACCEPT + "$IPTABLES" -P OUTPUT ACCEPT fi |