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 |