1

I have three hosts with following config:

Host A: IP:192.168.1.1/24
Host B: IP:192.168.1.2/24
Host C: IP:192.168.3.1/24

Everything happens on CentOS 6, and all interfaces are VLAN tagged (if it makes any difference here).

I am sending UDP traffic in directions B->A and C->A. This is pure unidirectional traffic, so havent configured any routing on Host A

Why C->A traffic is not accepted on A side unless routing to C is configured on A. (it is visible in tcpdump level, but not received by socket)

I spend a lot of time troubleshooting. I was expecting a lot of reasons: iptables, selinux, and even rp_filter settings, but solution was so simple.

I would like to hear what is the reason of such behavior, and if there is config that is reponsible for the need of having soource route in case of UDP.

1 Answer 1

4

You're probably bit by Linux's uRPF filter, which is designed to avoid packet spoofing but breaks asymmetric routing setups. Disable it with

sysctl net.ipv4.conf.all.rp_filter=0
sysctl net.ipv4.conf.eth0.rp_filter=0

(Yes, you need to disable both the all entry and the one specific to the interface.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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