On Tue, Nov 13, 2001 at 09:07:54PM -0600, David Blevins (dmblevins at mediaone.net) wrote:
> I spent all day reading about gateways, routing, etc. in order to setup
> Linux as my gateway.  I actually got it setup, but from what I understand
> the approach I tried is terribly insecure.
> 
> I did this and got it running:
> # echo 1 >/proc/sys/net/ipv4/ip_forward
> # ipchains -F
> # ipchains -P forward ACCEPT
> # ipchains -A forward -s 192.168.1.0/24 -d 0/0 -j MASQ
> 
> That works, but everything is reset when I restart my network.  And, as I
> read, this is apparently insecure.

You need to put your firewall rules in your init script so everytime
ipchains is started, it sets those rules.  Either put it in 
/etc/rc.d.init.d/ipchains or put it in a separate file and have the init 
script read in the rules.  I recommend a separate file.

-- 
Amy Tanner
amy at real-time.com