Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up a router based on a linux kernel. As expected, ipv4 packets received on the interface used by default route are sent back to the same interface in case no other route is found.

Is there a way to prevent ipv4 packets received on the default route interface to be sent back to the same interface? I want the packets to be dropped instead of being sent back.

I have been looking in /proc/sys/net/ipv4/conf but didn't find anything. My hope is to find a simple setting somewhere instead of using ip tables.

share|improve this question

migrated from May 28 '13 at 1:05

This question came from our site for professional and enthusiast programmers.

I have not found any simple setting. However, it is quite easy to solve the problem using iptables:

iptables -I FORWARD -i eth2 -o eth2 -j DROP

where eth2 is the interface used by the default route.

share|improve this answer

Your Answer


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