Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

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:

  • ipchains(8) - IP firewall administration

  • ipchains-restore(8) - restore IP firewall chains from stdin

  • ipchains-save(8) - save IP firewall chains to stdout

 
 
  Published under the terms of the Open Publication License Design by Interspire