How do I quickly block an IP address

To block an IP address in Linux run the following from a command prompt running as the root user.  Replace IP-ADDRESS with the actual xx.xx.xx.xx IP address.

iptables -A INPUT -s IP-ADDRESS -j DROP

If using firewalld the command is:

firewall-cmd --permanent --add-rich-rule="rule family=ipv4 source address=xx.xx.xx.xx reject"
firewall-cmd --reload

  • block, ip, address

Related Articles

I have a bunch of anonymous call attempts showing up in my call logs

I have a bunch of calls that look like this. 2011-11-18 00:27:10SIP/xx.xx...unknown"unknown"...

Do I need to do anything on the server/linux side of things?

You should not have to do anything on the server/linux side unless you want to tweak things or...

How hard is it to upgrade my server?

Upgrading resources such as memory, processing, hard drive space is instantaneous and does not...

Do you automatically upgrade our software when a newer version comes out?

Software upgrades are not automatic because they usually require service interruption.  We can...

Do you provided automatic backups.

Our premium plan includes automatic online backups.  All other plans can be backed up manually...