Chat with us, powered by LiveChat
How to ban IP address from the server?

How to ban IP address from the server?

Login to the server

su- root

for ip tables –

iptables -A INPUT -s -j DROP

For APF firewall is installed –

apf -d

after rebooting, the ban will be removed and in case if you have APF, to open the deny host files, type in the following –

pico /etc/apf/deny_hosts.rules

At the bottom, put in the IP address, thereafter save changes.

To restart APF,

/etc/apf/apf -r

Latest posts by shane (see all)

Sharing

Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.