Re: Linux system as a router

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

 



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. <DAVID.A.KIRKWOOD@xxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux