[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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
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 ( with the DHCP
offer and your computers should be able to reach the internet.

Reply to: