Tuesday, September 24, 2013

Linux Reverse Path Filtering

I faced a issue today, thought its a simple task but digged for 30 to 40 minutes to overcome this.

Basically I have a server which has 4 NIC port and I have to configure two NIC with different subnet, thought its a simple task, but it didn't worked.

After configuration the working NIC stopped working as well as the newly configured.

Post to this after some digging found reverse path filtering has to be disabled, and did the following,

echo "0" > /proc/sys/net/ipv4/conf/em1/rp_filter
em1 - ethernet device name

This has to be done for all NIC's which has to be configured.

To permanently add,
"echo 'net.ipv4.conf.em1.rp_filter = 0' >> /etc/sysctl.conf"
em1 - ethernet device name

Add it for loopback interface as well,
"echo 'net.ipv4.conf.lo.rp_filter = 0' >> /etc/sysctl.conf"
 Finally to take effect,
"sysctl -p"
Thanks.

No comments: