>> 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.
- From: "Manu" <firstname.lastname@example.org>
- Re: iptables
- From: Ansgar Wiechers <email@example.com>