silasmg
(usa Debian)
Enviado em 06/08/2010 - 08:54h
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --appernd FORWARD --in-interface eth0 -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A OUTPUT -o eth0 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.1.1:3128
iptables -A INPUT -j DROP
eth0 = LAN
eth1 = INTERNET
192.168.1.1 = IP do servidor proxy
Substitua o eth0, eth1 e 192.168.1.1 de acordo com a sua estrutura de rede.