Block an IP Address

If you think you are being attacked by an IP Address, you could block it by either firewall like:
iptables -A INPUT -s <ip-address> -j DROP
or if you want to block that IP from accessing a specific port, do:
iptables -A INPUT -s -<ip-address> p tcp --destination-port <port> -j DROP
(to unlock, replace "-A" with "-D")

or using the standard route command like:
/sbin/route add -host
<ip-address> reject
(to unblock replace the "add" part with "del")

Tags: , , , , , , , ,

One Comment

  1. Block an IP Address « Error404NotFound | IP address.co.uk says:

    […] Go here to read the rest: Block an IP Address « Error404NotFound […]

Leave a Comment