Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We have an externally-accessible subnet on which all our desktops and a few servers sit. Due to a lack of IPs, we put the servers (which don't need to be externally accessible) on a private subnet and our firewall simply routes between the two subnets and NATs if a machine on the private subnet needs to get out to the internet. (Not an ideal setup but the easiest to implement without a lot of upheaval)

One of the servers (a VM host) is currently configured on the private subnet and all works fine. We need to have the server accessible from outside so I tried to add an interface to the VM so that the server would have an interface on the private subnet and another interface on the main, external subnet.

Upon bringing up the second interface, the machine stops responding to pings on the first interface that originate from the main subnet. This happens on the server (CentOS) and the test Ubuntu VM I also tried it with.

Are there any kernel settings that might cause this? If a machine has one interface on 10.0.0.1/8 and another on 123.123.123.1/24, would it refuse to respond to a ping from 123.123.123.2 if it arrived on the 10.0.0.1 interface? I've checked and it's receiving the ping but not responding on either interface..

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Ah, managed to answer my own question..

As suspected, it was a kernel setting. Setting net.ipv4.conf.eth0.rp_filter=0 enabled the server to respond to traffic hitting eth0 that it thought should have been coming in via eth1..

sysctl net.ipv4.conf.eth0.rp_filter=0
share|improve this answer
    
I found sudo sysctl net.ipv4.conf.all.rp_filter=0 and sudo sysctl net.ipv4.conf.default.rp_filter=0 was necessary in my case. –  korylprince Dec 17 '13 at 4:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.