Gentoo Archives: gentoo-dev

From: Mezei Zoltan <mz269@××××××××××××××.hu>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] IP_MASQ
Date: Mon, 24 Jun 2002 14:36:23
Message-Id: 1024947373.4000.2.camel@jane.sch.bme.hu
In Reply to: Re: [gentoo-dev] IP_MASQ by Jeremiah Benham
1 Hi!
2
3 > ifconfig eth1 192.168.0.1
4 > ipchains -A forward -i eth0 -s 192.168.0.0/24 -j MASQ
5 > #iptables -A FORWARD -0 eth0 -s 192.168.0.0/24 -j
6 > MASQUERADE
7 > #iptables -A FORWARD -p tcp --syn -m limit --limit 1/s
8 > -j ACCEPT
9 > echo 1 > /proc/sys/net/ipv4/ip_forward
10
11 > If you figure out how to do this with iptables please
12 > tell me.
13 The correct iptables settings are:
14
15 echo 1 > /proc/sys/net/ipv4/ip_forward
16 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
17
18 That's all you need guys for masquerading.
19
20 Zizi
21
22 PS: RTFM at www.netfilter.org