diff options
Diffstat (limited to 'core/modules/netpoint-lightdm/data/usr/local/bin/guest-setup')
-rwxr-xr-x | core/modules/netpoint-lightdm/data/usr/local/bin/guest-setup | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/core/modules/netpoint-lightdm/data/usr/local/bin/guest-setup b/core/modules/netpoint-lightdm/data/usr/local/bin/guest-setup new file mode 100755 index 00000000..cb6791fc --- /dev/null +++ b/core/modules/netpoint-lightdm/data/usr/local/bin/guest-setup @@ -0,0 +1,25 @@ +#!/bin/sh + +IPTABLES=$(/usr/bin/which iptables) + +# reset +"$IPTABLES" -F INPUT +"$IPTABLES" -F FORWARD +"$IPTABLES" -F OUTPUT + +if [ "x${USER}" = "xdemo" ]; then + # filter out the internetz + "$IPTABLES" -P INPUT DROP + "$IPTABLES" -P FORWARD DROP + "$IPTABLES" -P OUTPUT DROP + + # block internetz + "$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 + "$IPTABLES" -P INPUT ACCEPT + "$IPTABLES" -P FORWARD ACCEPT + "$IPTABLES" -P OUTPUT ACCEPT + +fi |