Gentoo Archives: gentoo-user

From: Chuanwen Wu <wcw8410@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] iptables configuration problem
Date: Mon, 14 May 2007 11:31:06
Message-Id: 7797aa370705140423p2f320d5akfc18fc71e0f10a52@mail.gmail.com
In Reply to: Re: [gentoo-user] iptables configuration problem by Norberto Bensa
1 2007/5/14, Norberto Bensa <nbensa@×××.net>:
2 > Chuanwen Wu wrote:
3 > > I have tried set all the gw in my subnet to 192.168.1.254 or 192.168.1.1.
4 > > Is't all right?
5 >
6 > I don't know, it depends on what's your gw's IP is.
7 >
8 > Let's say you have this setup:
9 >
10 >
11 > GW: 192.168.1.1
12 >
13 > Other PCs are: 192.168.1.2... 192.168.1.3... and so on.
14 >
15 >
16 > On the GW you need:
17 >
18 > echo 1 > /proc/sys/net/ipv4/ip_forward
19 >
20 > iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
21 > (note: change ethX by the NIC your internet connection is on. If your
22 > cablemodem/adsl/whatever is on eth3 -for example- change ethX to eth3)
23 >
24 >
25 > On the others PC you need to set GW to 192.168.1.1
26 >
27 >
28 > I hope this helps.
29 >
30 > Best regards,
31 > Norberto
32 >
33 Thank you!I think i have done what you meant.
34 Here is the information:
35
36 /etc/conf.d/net in the server
37 config_eth0=( "202.114.10.134 netmask 255.255.255.0 brd 202.114.10.255" )
38 routes_eth0=( "default gw 202.114.10.129" )
39
40 config_eth1=( "192.168.1.63 netmask 255.255.255.0 brd 192.168.1.255" )
41 routes_eth1=( "default gw 192.168.1.1" )
42
43
44 /etc/conf.d/net in one PC
45 config_eth0=( "192.168.1.35 netmask 255.255.255.0 brd 192.168.1.255" )
46 routes_eth0=( "default gw 192.168.1.1" )
47
48 --
49 wcw
50 --
51 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] iptables configuration problem Norberto Bensa <nbensa@×××.net>