Re: routing within same nic card

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

 



Presently I have 2 NIC cards;
eth1 = 212.119.xxx.98/30  directly connected to internet
eth0 = 212.119.xxx.105/29 connected to LAN, with this setup everything is working fine

now I need to add another network, since I cannot Add another NIC card, my solution is like this
eth1 = 212.119.xxx.98/30 directly connected to internet
eth0 = 212.119.xxx.105/29 connected to LAN1
eth0:1 = 192.168.3.0/26 connected to LAN2

This seems reasonable enough.

I already done the 3 lines below
sysctl -w net.ipv4.ip_forward=1
iptables -A FORWARD  -s 192.168.3.0/26 -d 212.119.xxx.104/29 -j ACCEPT
iptables -A FORWARD  -s 212.119.xxx.104/29 -d 192.168.3.0/26 -j ACCEPT

This should also work as it allows traffic between the 192.168.3.0/26 212.119.xxx.104/29 networks.  I would need to see the contents of your nat table POSTROUTING chain to make sure that you would not be NATing traffic that you would not want.  Other than that I don't think you would have any problems.  Seeing as how you are not filtering based on interface I don't think you will have any issues with it.



Grant. . . .


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux