Wednesday, June 22, 2011

Re: iptables

>> cat /proc/sys/net/ipv4/ip_forward is 1
>>
>> What are routes I have to create with route command ?
>
> Normally you shouldn't have to create any for that kind of setup.
4-step NAT, first step is to enable forwarding on the specific
interfaces, or ip_forward globally.
next three steps are iptables rules:
iptables -A FORWARD -i eth0 -o eth1 -m state --state
RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Next step is to configure the DHCP-server to propagate the IP
addresses to the network. Send the gateway (10.20.30.1) with the DHCP
offer and your computers should be able to reach the internet.


--
To UNSUBSCRIBE, email to debian-firewall-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/BANLkTi=t27JZOTndtmnz5CKEztqwUnpwyQ@mail.gmail.com

No comments:

Post a Comment