Multi ip adress to reject with iptables
Hello,
I have a plain text file which contain one ip adress or domain name per line. I would like to make a simple script that use this file to reject all the ip adress and domain names that are in. Can somebody help me to do it because i don't know to make script like this ? I just want to limit unwanted pop-up without using any proxy that could do it i know. Thank you. Exalik |
I got this from the firewall at http://projectfiles.com/firewall/. I modified the script slightly so it reads the $BLACKLIST variable from a file I have in /etc/sysconfig/blacklist. The format of the blacklist file is like this:
Format: [<host or network address>[/<netmask>]][:[<port or port-range>[/<protocol>]] You can probably stick this in any rc.firewall script and get it to work with very little tweeking. Anyway here is the code which does the work: Code:
blacklistfile="/etc/sysconfig/blacklist" |
All times are GMT -5. The time now is 09:39 PM. |