# get local settings eval $(/usr/bin/netparam) # Place your firewall addons here case $1 in start) #iptables -I INPUT -m mac --mac-source 00:11:22:33:44:55 -j DROP # Masquerade WIFI Traffic through LAN to gateway 192.168.0.22 iptables -t nat -A POSTROUTING -o $LANDEV -s $WIFINET/$WIFIPRE -d ! $LANNET/$LANPRE -j MASQUERADE iptables -I FORWARD -i $LANDEV -o $WIFIDEV -j ACCEPT iptables -I FORWARD -i $WIFIDEV -o $LANDEV -d 192.168.0.22 -j ACCEPT ;; stop) #iptables -D INPUT -m mac --mac-source 00:11:22:33:44:55 -j DROP # Masquerade WIFI Traffic through LAN to gateway 192.168.0.22 iptables -t nat -D POSTROUTING -o $LANDEV -s $WIFINET/$WIFIPRE -d ! $LANNET/$LANPRE -j MASQUERADE iptables -D FORWARD -i $LANDEV -o $WIFIDEV -j ACCEPT iptables -D FORWARD -i $WIFIDEV -o $LANDEV -d 192.168.0.22 -j ACCEPT ;; esac