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
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
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

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


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