On Thu, 29 Sep 2005 10:12:45 -0700, jcharth wrote:
> I have to subnets 10.1.1.0/24 and 10.1.2.0/24, eth0 and eth1.
>
> What do i need to set up the router?
> is it
>
> iptables -F
>
> echo > /proc/sys/net/ipv4/ip_forward
>
> enought?
>
> thanks.
A little more information is needed. Is this a gateway to the internet,
say using eth2? If so then you need
iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
also
echo 1 > /proc/sys/net/ipv4/ip_forward
You'll probably want to add the following line to /etc/sysctl.conf
net.ipv4.ip_forward = 1
So you don't have to enter the above echo command each time you restart
your system.
If this is just a bridge between two subnets, you probably don't need to
change your NAT table. I haven't set up a bridge myself, so I'll let
someone else talk you through this, but I expect you will only need to
adjust your routing table.
|