Press "Enter" to skip to content

Reload iptables on every boot


To be able to load your iptables ruled everytime your Linux system is restarted just follow these commands.

$ sudo iptables-save > /etc/firewall.conf

Open /etc/network/if-up.d/iptables and add:

iptables-restore < /etc/firewall.conf

Provide executable permission:

$ sudo chmod +x /etc/network/if-up.d/iptable

Now, your iptable rules will be loaded every time your Linux box is booted.

If you need to modify your rules just execute:

$ sudo iptables-save > /etc/firewall.conf




Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.