Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Need networking help. Can't ping google.
Date: Fri, 10 Dec 2010 12:29:37
Message-Id: AANLkTi=_AL32BOuM3cPUOBektZWzyjaKRmvEtOGe38kv@mail.gmail.com
In Reply to: Re: [gentoo-user] Need networking help. Can't ping google. by Keith Dart
1 On 10 December 2010 09:40, Keith Dart <keith@×××××××××.biz> wrote:
2 > === On Fri, 12/10, Dale wrote: ===
3 >> I did this.  From smoker, I pinged google.  I got the IP address from
4 >> that.  I then tried to ping google BY IP address on lightening.  It
5 >> gives me the error "ping: unknown host 72.14.299.99".
6 >
7 > ===
8 >
9 > That's a different error. That is not a valid address.
10 >
11 > So then, smoker is your router. But is your DSL modem also a router? Or
12 > do you have PPPoE terminating in your smoker?
13 >
14 > Your DSL modem is probably a router with NAT. It will need a static IP
15 > address back to your other network, next hop being smoker.
16 >
17 > Better would be to get a hub and connect all hosts (including modem, to
18 > it.
19
20 As Keith says the easiest thing would be to go buy yourself a better
21 ADSL router (because I suspect that you are running some cheap
22 half-bridged ISP router) which will act as your ADSL modem, NAT
23 router, DNS repeater, and LAN firewall, all-in-one. You should be
24 able to pick up a cheap cisco or netvanta from ebay.
25
26 However, you ain't going to learn much network-wise if you do that.
27 So, instead you may want to run something like this on smoker (check
28 man iptables for details):
29
30 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
31
32 Using the man pages you can add --match <parameters> to only allow
33 your lightning box to be processed and anything else dropped.
34
35 You will also need to set an additional subnet for your LAN (between
36 your smoker and lightning boxen).
37
38 So all together it could look like this:
39
40 Smoker:
41
42 NIC eth2
43
44 ip: 192.168.1.X
45 Netmask : 255.255.255.0
46 Broadcast: 192.168.1.255
47 gateway: 192.168.1.254 (that's your ADSL router's IP address)
48
49 for DNS use your ADSL router's IP address (if it acts as a local
50 resolver) or your ISP's DNS server address, or OpenDNS ip addresses
51 (google for it).
52
53 Then you need to set up your second smoker NIC like this:
54
55 NIC eth0
56
57 ip: 192.168.2.X (different subnet than your DSL network)
58 Netmask : 255.255.255.0
59 Broadcast: 192.168.2.255
60 gateway: 192.168.1.254 (also your ADSL router's IP address)
61
62 Finally, on your lightning box you need this:
63
64 NIC ethX
65
66 ip: 192.168.2.XX (same subnet as your eth0 NIC on smoker, but
67 different IP of course)
68 Netmask : 255.255.255.0
69 Broadcast: 192.168.2.255
70 gateway: 192.168.2.X (same as the IP of your eth0 NIC on smoker)
71
72 for DNS set up /etc/resolv.conf on lightning the same as for smoker above.
73
74 The above should hopefully work.
75
76 --
77 Regards,
78 Mick

Replies

Subject Author
Re: [gentoo-user] Need networking help. Can't ping google. Dale <rdalek1967@×××××.com>