All pastes #628820 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-21 17:53 UTC
rendered paste body
#
echo "1" > /proc/sys/net/ipv4/ip_forward
#
 
#
iptables -F
#
iptables -P INPUT ACCEPT
#
iptables -P OUTPUT DROP
#
iptables -P FORWARD ACCEPT
#
 
#
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#
 
#
#eth0 <---> eth1 forwarding
#
 
#
iptables --flush
#
iptables --table nat --flush
#
iptables --delete-chain
#
iptables --table nat --delete-chain
#
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
#
 
#
#Opened Ports Outgoing
#
iptables -A OUTPUT -p tcp --dport 25 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 110 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport www -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 20 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 21 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 1723 -j ACCEPT
#
iptables -A OUTPUT -p tcp --dport 10443 -j ACCEPT