Persistent IPtables on Raspberry Pi (Raspbian)
This article is not about building proper iptable rules but on how to make iptable configurations to load on every reboot.
I have been trying to find a consistent and easy solution to implement iptables on Raspberry Pi (Raspbian-wheezy), the way Debian and Raspbian works does not provide a way to load iptables on every boot, it needs to be added manually as a script to load on start-up. There are ways to make Raspbian work without the instructions below, although the following - I think - are very simple and elegant.
There are some steps to take before we begin, I am going to assume you have a Rasbian Pi up and running with the following commands executed:
# apt-get dist-upgrade
# apt-get update
Step 1: Install iptables-persistent package with apt-get command.
# apt-get install iptables-persistent
On the menu, select Yes on the rule.v4 file. The second choice is
Continue reading →