Simple bash script to have an automated firewall in linux using IPTABLES.
This script is part of an articles saga that you can read in http://rolandocaldas.com (spanish blog)
- First article: Banear IPs en linux automáticamente con IPTABLES
The bash script runs like a service so it's necessary start the script to use it.
To start the service run:
/etc/myOwnFirewall/myOwnFirewall start
The script reads a text file and bans all the ips of this file when the script starts
You can add a new ip to the banned ip list running the command
/etc/myOwnFirewall/myOwnFirewall ban [ip]
you can remove a ip from the banned ip list running the command
/etc/myOwnFirewall/myOwnFirewall unban [ip]
You can stop the firewall (and remove all their rules) if you run the command
/etc/myOwnFirewall/myOwnFirewall stop
You can restart the firewall if you run the command
/etc/myOwnFirewall/myOwnFirewall restart
The current version is the v0.1, the initial version.