0

I've managed to use below command to block ip address:

/sbin/route add -host 111.111.111.11 reject

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

0

You can view the routing table with:

netstat -r
netstat -rn
0

running

/sbin/route

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. -               255.255.255.255 !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.

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.