Gentoo Archives: gentoo-user

From: Norberto Bensa <nbensa@×××.net>
To: Chuanwen Wu <wcw8410@×××××.com>, gentoo-user@l.g.o
Subject: Re: [gentoo-user] iptables configuration problem
Date: Mon, 14 May 2007 10:56:11
Message-Id: 200705140748.34409.nbensa@gmx.net
1 Chuanwen Wu wrote:
2 > I have tried set all the gw in my subnet to 192.168.1.254 or 192.168.1.1.
3 > Is't all right?
4
5 I don't know, it depends on what's your gw's IP is.
6
7 Let's say you have this setup:
8
9
10 GW: 192.168.1.1
11
12 Other PCs are: 192.168.1.2... 192.168.1.3... and so on.
13
14
15 On the GW you need:
16
17 echo 1 > /proc/sys/net/ipv4/ip_forward
18
19 iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
20 (note: change ethX by the NIC your internet connection is on. If your
21 cablemodem/adsl/whatever is on eth3 -for example- change ethX to eth3)
22
23
24 On the others PC you need to set GW to 192.168.1.1
25
26
27 I hope this helps.
28
29 Best regards,
30 Norberto
31 --
32 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] iptables configuration problem Chuanwen Wu <wcw8410@×××××.com>