> Balázs Nagy <bn@xxxxxxxxxxxxxx> wrote
> Assuming you have two NICs, eth0 is your intranet, eth1 goes to the
> router/ATM/what have you and your internal net is 192.168.0.0:
>
> #!/bin/sh
> route add -net 192.168.0.0 netmask 255.255.255.0 eth0
> route add default eth1
> ipchains -P forward DENY
> ipchains -A forward -i eth1 -j MASQ
>
> the first time you also need this:
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> This is a basic firewall, and don't blame me if people hack fairly easily
> your system. If you want to get a stronger firewall, we can take this
> off-list...
This will get routing working with IP masquerading. Coutesy of Balazs.
However I think this goes away if you reboot, but can be added to config files
to survive a reboot.