IPTables - Firewall an IP

Have you ever wondered how you can Firewall an IP from your VPS? We'll here's how !

 

 

1. Log into your SSH using user "root".

2. Start IP Tables using "service iptables start"

3. Enter the following to DROP (block) the IP.

 

 

---------------DROP-------------------

/sbin/iptables -A INPUT -s [ip here] -j DROP

service iptables save

 

 

3. To verify if the user has been blocked use "service iptables status"



You're all done, now the IP won't be able to access your VPS.

 

  • 120 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟