Basic Ipchains Firewall Rule Script is an iptables firewall script.
WARNING THIS SCRIPT HAS NOT BEEN TESTED YET! USE AT YOUR OWN RISK.
TIPS:
- To test your ruleset without actually changing the firewall, you can change the IPTABLES variable below to "echo" and run the script. This will print a copy of the ruleset commands out to stdout (screen)
- To tidy it up even more, you could try this when you run the script with the "echo" setting:
/etc/rc.d/rc.firewall | grep '^-' | sed 's/^-/ipchains -/'
- Or to create a prebuilt ruleset with your variables already set:
/etc/rc.d/rc.firewall | grep '^-' | sed 's/^-/ipchains -/' > newfile
Of course you will have to rerun this and create a new script whenever you change the variables in this script.
Product's homepage