Server Fault is a question and answer site for system and network administrators. 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've managed to use below command to block ip address:

/sbin/route add -host reject

How do I view if this is in the list? How do I view all IP's that are currently blocked?

share|improve this question

migrated from Mar 1 '12 at 1:55

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

up vote 0 down vote accepted

You can view the routing table with:

netstat -r
netstat -rn
share|improve this answer



will display the current rules. You should see something like this:

[user@host ~]$ sudo /sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
KD111111111011. -      !H    0      -        0 -

This isn't too viewer friendly, but the Destination is the IP without any .'s in it. 11 became 011 because it uses 3 places for each octet.

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.