Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 learn the rounte command can add the reject rule by:

route add -host aaa.bbb.ccc.ddd reject

But, I have no idea to display the reject rules set. How to get the all reject rules set by others ?

share|improve this question
up vote 2 down vote accepted

On Linux at least, the route command shows reject-routes with a ! in the Flags column, so something like:

route | egrep 'Flags|!'

will show you just the reject-routes (and the headers).

share|improve this answer
thanks, I also found the command: ip route show – qrtt1 Mar 19 '11 at 10:58

The ip command can be used to show only these routes, they're called "unreachable" in ip. For example:

$ sudo route add reject
$ sudo ip route add unreachable
$ sudo ip route ls type unreachable  scope host 
share|improve this answer

Your Answer


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.