[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NFS and iptables during bootup



----- Original Message -----
> From: "Martin T" <m4rtntns@gmail.com>
> 
> Hi,
> 
> I made a very simple bash script which loads the iptables
> configuration from /etc/firewall.conf and /etc/firewall6.conf files:
> 
> # cat /etc/init.d/firewall
> #!/bin/bash
> 
> iptables-restore < /etc/firewall.conf
> ip6tables-restore < /etc/firewall6.conf
> #
> 
> Script is stored in /etc/init.d/ directory, but I haven't configured
> init to load this script directly. I use the pre-up option in
> /etc/network/interfaces instead:
> 
> # grep pre-up /etc/network/interfaces
>   pre-up /etc/init.d/firewall
> #
> 

FYI, you can use the iptables-persistent package to do this.  It handles ipv4 and ipv6, and won't require you to create your own init script.

-Rob


Reply to: