Block an IP using iptables

To block an IP using iptables, use

Replace IPADDR with IP address you need to block.

To block an IP range

Example, bock IP range

Unblock an IP address

To unblock an IP address, first find the rule number, you can do it with the command

Once you find the number of rule to be removed, you can run


iptables delete a rule

See iptables

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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