Re: Linux system as a router

"Richard Nairn" <[email protected]> Tue, 07 Apr 2009 14:35:33 -0600
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
If you are doing NATting at the router you need a rule such as 
iptables -t nat -I POSTROUTING -o eth0 -j MASQ if you have a dynamic address, or
iptables -t nat -I POSTROUTING -o eth0 -j SNAT --to-source 1.2.3.4 if you have a static address

you also need net.ipv4.ip_forward=1 in /etc/sysctl.conf

Then have your default route go out your WAN interface.

On Tue, 07 Apr 2009 14:13:18 -0600, Kirkwood, David A. <[email protected]> wrote:

> How do I set up iptables to make the linux system function as a router?
> I think I need to set forwarding between the two interfaces, but I don't
> understand the syntax of the command.
>
> Thanks,
>
> David A. Kirkwood
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html