How to Block an IP Address from Accessing my Dedicated Server

First you have to login to your Dedicated server as root via SSH. Then execute the following command in order to block an IP address from accessing your server:

iptables -I INPUT -s IP_ADDRESS -j DROP

Note that you will have to do this each time your firewall is restarted.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 1883