12.4. Deny access to some address

Sometimes you'll know an address that you would like to block from having any access at all to your server. You can do that by creating the rc.firewall.blocked file under /etc/rc.d/ directory and uncomment the following lines in your firewall rules scripts file:

Edit your firewall scripts file vi /etc/rc.d/init.d/firewall and uncomment the following lines:

         if [ -f /etc/rc.d/rc.firewall.blocked ]; then
         . /etc/rc.d/rc.firewall.blocked
         fi
         
         

Create the rc.firewall.blocked file touch /etc/rc.d/rc.firewall.blocked and add inside this file all the IP addresses that you want to block from having any access to your server at all: For example, I put the following IP addresses in this file:

Example 12-1. rc.firewall.blocked


         204.254.45.9
         187.231.11.5
         

Further documentation, more details, there are several man pages you can read: