Top Nav

Block IP Address With IPTables

Need to block am IP address from your server? Here’s an IPTables command:

/sbin/iptables -I INPUT -s w.x.y.z -j DROP

where w.x.y.z is the IP address to be blocked.

Here’s a way to block and address with just the route command:

/sbin/route add -host w.x.y.z reject