All pastes #70572 Raw Edit

Mine

public text v1 · immutable
#70572 ·published 2006-06-24 13:44 UTC
rendered paste body
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X


iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT


iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT

iptables --append FORWARD --in-interface ath0 -j ACCEPT
iptables --append FORWARD --in-interface eth0 -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --table nat --append POSTROUTING --out-interface ath0 -j MASQUERADE


# to stop net ssh connections

iptables -A INPUT -s ! 192.168.0.0/22 -p tcp --dport ssh -j DROP

echo 1 > /proc/sys/net/ipv4/ip_forward