Firewall installation scripts
You'll find here a set of firewall scripts that you can run.
These scripts are the results of a long time of trial / errors + work. Thanks to all the one that helped me to make them!
Contents
Scripts
To use the firewall you need to:
- Have a firewall start script
- Have a firewall stop script
- Have a firewall launcher script
- Register the firewall to the boot sequence
Firewall start script
My firewall start script: http://www.daxiongmao.eu/wiki_upload_files/firewall/firewall-start.sh
NetBoot client Firewall start script
My NetBoot firewall start script (LAN only): http://www.daxiongmao.eu/wiki_upload_files/firewall/firewall-nfs-client.sh
Firewall stop script
My firewall stop script: http://www.daxiongmao.eu/wiki_upload_files/firewall/firewall-stop.sh
Firewall launcher script
My firewall stop script: http://www.daxiongmao.eu/wiki_upload_files/firewall/firewall.sh
Installation
- Download and adjust all the previous scripts.
- Put all the scripts in /etc/firewall/ and set the execution rights
mkdir /etc/firewall
cp firewall* /etc/firewall/
chmod -R 755 /etc/firewall
- Create some symlink for the firewall
ln -s /etc/firewall/firewall.sh /usr/bin/firewall
ln -s /etc/firewall/firewall.sh /etc/init.d/firewall
- Register firewall script to boot sequence
cd /etc/init.d
update-rc.d firewall defaults
Reboot and check that the firewall is up with:
firewall status
Note
All this knowledge is the result of years of experiments and trials. Don't hesitate to search over Internet for more advanced || simpler rules.
References
- How to set IPv4 as default: http://bruteforce.gr/make-apt-get-use-ipv4-instead-ipv6.html
- Working years and some co-workers help:
- Julien Rialland