# Clear any existing firewall stuff before we start iptables --flush # As the default policies, drop all traffic iptables --policy INPUT DROP iptables --policy OUTPUT ACCEPT iptables --policy FORWARD ACCEPT # iptables -A INPUT -i wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -i ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT # openvpn iptables -A INPUT -p all -s 10.8.0.0/24 -j ACCEPT # local iptables -A INPUT -p all -s 127.0.0.1 -j ACCEPT # SSH iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# Accept all incoming traffic associated with an established # connection, or a "related" connection iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/home/user # iptables -A INPUT -i wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables v1.2.11: Couldn't load match `state':/lib/iptables/libipt_state.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information. /home/user # iptables -A INPUT -i ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables v1.2.11: Couldn't load match `state':/lib/iptables/libipt_state.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information.