Linux Security: How to block an IP so it can’t connect to your server

You can use IP Tables or a reject route.

Reject route ex:

/sbin/route add -host 200.x.x.x reject

list routes:     route -n

remove block: route del reject


or, you can use iptables to ban a range of IPs from your server, like so:

iptables -I INPUT -s -j DROP





Leave a Reply

Your email address will not be published. Required fields are marked *

Loading Facebook Comments ...
Loading Disqus Comments ...