Block an IP Address in SSH

kylespringer

New member
I am getting mail spam relaying off one of my customers domains, not his fault but how do I block the email's IP addresss in whm or ssh?
 
If you have apf firewall installed then you can simply use the command

apf -d xx.xx.xx.xx where xx.xx.xx.xx is the ip address that you wish to block.

Alternatively you can use IPtables to block the IP as follows :

iptables -I INPUT -s xx.xx.xx.xx -j DROP where xx.xx.xx.xx is the ip address that needs to be blocked.

One more option is you can use route command to block ip addresses on a server.

I hope any of the above methods should solve your purpose :)
 
ThinkSupport, I don't know if it helped Kyle, but thanks for the info. I am going to jot it down in case I ever need it!

Libby
 
Back
Top