Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have centos 6.5 server with two NICs cards to work as a router without nat
first eth0 is connected to a router1 with subnet 10.10.10.0/30 (centos has 10.10.10.2 IP and the router has 10.10.10.1 IP)
second eth1 is connected to another router2 with public subnet for example 8.8.8.0/30 (centos has IP 8.8.8.2 and router IP 8.8.8.1)
I have configured the default gateway to be 8.8.8.1
I have enabled IPV4 forwarding
router1 can ping to 8.8.8.1 through the server successfully, the traffic get forwarded from eth0 (10.10.10.2) to eth1 (8.8.8.2) and back successfully
now if there is a client behind router1 wants to reach hotmail.com for example lets assume client ip is 1.1.1.1 wants to reach 2.2.2.2, the communication should be as follow
1- router1 will handle the traffic to server eth0
2- eth0 will forward the traffic to eth1 (because there is only one route which is the default gateway to 8.8.8.1)
3- eth1 will forward the traffic to router2 8.8.8.1
4- router2 will return the answer to the client but through another route not through the server
I had centos 5.3 and it worked properly with this design, when i issue tcpdump -i eth0 i see the traffic from the client (EX 1.1.1.1.port > 2.2.2.2.port)
also tcpdum -i eth1 show the same traffic (EX 1.1.1.1.port > 2.2.2.2.port)
also iptables -nL -v show the forwarding chain packet count increase
now the new server Centos 6.5 does not do the same I see the traffic enters the server on eth0(10.10.10.2) with tcpdump -i eth0, but I can't see it forwarded to eth1 (8.8.8.2) with tcpdump -i eth1, and also iptables doesn't show increase in the forwarding chain packet count, why is this happening?
PLease any help because this issue is driving me crazy, am i missing something or what?!!
Thank you very much, this solved the problem and also this is the difference between centos 5 and centos 5 the extra boolean of Reverse Path Forwarding in loose mode 2 as described here: https://access.redhat.com/site/solutions/53031
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.