iptables init scripts

Félim Whiteley felimwhiteley at gmail.com
Fri Oct 2 14:34:50 UTC 2009


I usually setup my /etc/network/interfaces file so loopback activates a 
iptables save file with:

auto lo
iface lo inet loopback
        address 127.0.0.1
        netmask 255.0.0.0
        up iptables-restore < /etc/network/iptables

That way whether ethX is up/down the firewall is active. I just save a 
standard dump of whatever rules I want to /etc/network/iptables with

iptables-save > /etc/network/iptables

If I want to edit it it's really simple to edit the text file, flush the 
current tables and then just bring down and back up lo and they are reapplied.

On Friday 02 October 2009 16:24:13 Michael Zoet wrote:
> > any recommended iptables init scripts that will play well with
> > network-manager?
> 
> Why do you want to use the network-manager if you have an ubuntu server
> installation? And why do you want to integrate iptables with the network
> manager?
> 
> Normally you can put up a line
> 
> up /<PATH_TO_MY_FIREWALL_SCRIPT>
> 
> in /etc/network/interfaces. Or you can write your own
> /etc/init.d/iptables_rules script. And there are much more possibilities
> but I would never use the network manager on a server installation.
> 
> Michael
> 





More information about the ubuntu-server mailing list