Firewalling on Linux 2.4

Rob Flickenger rob at oreillynet.com
Tue Jun 19 18:55:55 PDT 2001


On Tue, 19 Jun 2001, Christopher White wrote:

> I'm doing simple firewalling

Hmm, looks like Masquerading...

> :input ACCEPT
> :forward DENY
> :output ACCEPT
> -A forward -s 192.168.110.0/0 -d 0.0.0.0/0.0.0.0 -j MASQ

Give this a try.  I stick it in /etc/rc.d/rc.local:

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward

For more documentation, try:

http://netfilter.filewatcher.org/unreliable-guides/NAT-HOWTO/index.html

Good luck!

--Rob



More information about the talk mailing list