Re: [gentoo-user] Need networking help. Can't ping google.
On Friday 10 December 2010 18:25:14 Dale wrote: Mick wrote: snip ... The above should hopefully work. OK. I had a LONG day yesterday. I took a nap. I was getting a little goofy here. Before I try all this, what is the best way to undo everything I have done with this so far? I ask because I have tried two scripts and I don't know what all has been changed and what state things are in. To flush your iptable rules you can run: /sbin/iptables -F -F, --flush [chain] Flush the selected chain (all the chains in the table if none is given). This is equivalent to deleting all the rules one by one. If you only want to flush one chain (e.g. OUTPUT) then run: /sbin/iptables -F OUTPUT Running /sbin/iptables -L -v -n before and after will show you what rules are there and what are deleted. Iptables scripts usually run --flush to clear out any previous rules before they add their own. You can edit any such script to add the MASQUERADE target I suggested previously in the POSTROUTING chain (following the syntax of the particular script). I also noticed this. When I have lightening hooked to smoker and smoker hooked to the modem, I can't get to the internet until I restart eth2 which is what connects smoker to the modem. It acts like it is trying to use eth0 instead of eth2. ... and I bet that the routes do not look like what you posted in your first message. Your current routes are not correctly configured. The fact that it is trying to use eth0 may be related to the ethX number? i.e. it starts from the lowest number and it works it's way up. You can delete your net udev rules and reboot to change these (or manually edit your udev rules). Either way, adapt my previous instructions for your respective NIC numbers. The modem I have is a Motorola Netopia 2210-02. I took that info from the home page of the modem. Just looking at it, it's the little silver colored thing and I did pay almost $80.00 for that thing. It also says it has a DNS server and it is on. It looks like a well spec'ed single port modem and ADSL router. Since it is running a DNS repeater you can set in your /etc/resolv.conf files the IP of your router as the DNS server - if it doesn't pick it up on its own. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Need networking help. Can't ping google.
ip_forward is set to one. Confirmed it with cat. I did this one time before. I found a iptables script and when I ran it, it just worked. The script is old and doesn't work anymore. The last time it was a gateway issue. I'm not sure this time. Are there any iptables rules on smoker? (iptables -L) I did this. From smoker, I pinged google. I got the IP address from that. I then tried to ping google BY IP address on lightening. It gives me the error ping: unknown host 72.14.299.99. So you set lights default route to be smokers 169.254 address, right? Can you ping smokers 192.168.1 address from light? Did you add a route on the modem so it knows it has to send packets to smoker to get them to 169.254? Or alternatively put NATing on smoker to hide the 169.254 addresses?
Re: [gentoo-user] Need networking help. Can't ping google.
=== On Fri, 12/10, Dale wrote: === I did this. From smoker, I pinged google. I got the IP address from that. I then tried to ping google BY IP address on lightening. It gives me the error ping: unknown host 72.14.299.99. === That's a different error. That is not a valid address. So then, smoker is your router. But is your DSL modem also a router? Or do you have PPPoE terminating in your smoker? Your DSL modem is probably a router with NAT. It will need a static IP address back to your other network, next hop being smoker. Better would be to get a hub and connect all hosts (including modem, to it. -- Keith Dart -- -- ~ Keith Dart ke...@dartworks.biz public key: ID: 19017044 http://www.dartworks.biz/ =
Re: [gentoo-user] Need networking help. Can't ping google.
On 10 December 2010 09:40, Keith Dart ke...@dartworks.biz wrote: === On Fri, 12/10, Dale wrote: === I did this. From smoker, I pinged google. I got the IP address from that. I then tried to ping google BY IP address on lightening. It gives me the error ping: unknown host 72.14.299.99. === That's a different error. That is not a valid address. So then, smoker is your router. But is your DSL modem also a router? Or do you have PPPoE terminating in your smoker? Your DSL modem is probably a router with NAT. It will need a static IP address back to your other network, next hop being smoker. Better would be to get a hub and connect all hosts (including modem, to it. As Keith says the easiest thing would be to go buy yourself a better ADSL router (because I suspect that you are running some cheap half-bridged ISP router) which will act as your ADSL modem, NAT router, DNS repeater, and LAN firewall, all-in-one. You should be able to pick up a cheap cisco or netvanta from ebay. However, you ain't going to learn much network-wise if you do that. So, instead you may want to run something like this on smoker (check man iptables for details): iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Using the man pages you can add --match parameters to only allow your lightning box to be processed and anything else dropped. You will also need to set an additional subnet for your LAN (between your smoker and lightning boxen). So all together it could look like this: Smoker: NIC eth2 ip: 192.168.1.X Netmask : 255.255.255.0 Broadcast: 192.168.1.255 gateway: 192.168.1.254 (that's your ADSL router's IP address) for DNS use your ADSL router's IP address (if it acts as a local resolver) or your ISP's DNS server address, or OpenDNS ip addresses (google for it). Then you need to set up your second smoker NIC like this: NIC eth0 ip: 192.168.2.X (different subnet than your DSL network) Netmask : 255.255.255.0 Broadcast: 192.168.2.255 gateway: 192.168.1.254 (also your ADSL router's IP address) Finally, on your lightning box you need this: NIC ethX ip: 192.168.2.XX (same subnet as your eth0 NIC on smoker, but different IP of course) Netmask : 255.255.255.0 Broadcast: 192.168.2.255 gateway: 192.168.2.X (same as the IP of your eth0 NIC on smoker) for DNS set up /etc/resolv.conf on lightning the same as for smoker above. The above should hopefully work. -- Regards, Mick
Re: [gentoo-user] Need networking help. Can't ping google.
Mick wrote: On 10 December 2010 09:40, Keith Dartke...@dartworks.biz wrote: === On Fri, 12/10, Dale wrote: === I did this. From smoker, I pinged google. I got the IP address from that. I then tried to ping google BY IP address on lightening. It gives me the error ping: unknown host 72.14.299.99. === That's a different error. That is not a valid address. So then, smoker is your router. But is your DSL modem also a router? Or do you have PPPoE terminating in your smoker? Your DSL modem is probably a router with NAT. It will need a static IP address back to your other network, next hop being smoker. Better would be to get a hub and connect all hosts (including modem, to it. As Keith says the easiest thing would be to go buy yourself a better ADSL router (because I suspect that you are running some cheap half-bridged ISP router) which will act as your ADSL modem, NAT router, DNS repeater, and LAN firewall, all-in-one. You should be able to pick up a cheap cisco or netvanta from ebay. However, you ain't going to learn much network-wise if you do that. So, instead you may want to run something like this on smoker (check man iptables for details): iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Using the man pages you can add --matchparameters to only allow your lightning box to be processed and anything else dropped. You will also need to set an additional subnet for your LAN (between your smoker and lightning boxen). So all together it could look like this: Smoker: NIC eth2 ip: 192.168.1.X Netmask : 255.255.255.0 Broadcast: 192.168.1.255 gateway: 192.168.1.254 (that's your ADSL router's IP address) for DNS use your ADSL router's IP address (if it acts as a local resolver) or your ISP's DNS server address, or OpenDNS ip addresses (google for it). Then you need to set up your second smoker NIC like this: NIC eth0 ip: 192.168.2.X (different subnet than your DSL network) Netmask : 255.255.255.0 Broadcast: 192.168.2.255 gateway: 192.168.1.254 (also your ADSL router's IP address) Finally, on your lightning box you need this: NIC ethX ip: 192.168.2.XX (same subnet as your eth0 NIC on smoker, but different IP of course) Netmask : 255.255.255.0 Broadcast: 192.168.2.255 gateway: 192.168.2.X (same as the IP of your eth0 NIC on smoker) for DNS set up /etc/resolv.conf on lightning the same as for smoker above. The above should hopefully work. OK. I had a LONG day yesterday. I took a nap. I was getting a little goofy here. Before I try all this, what is the best way to undo everything I have done with this so far? I ask because I have tried two scripts and I don't know what all has been changed and what state things are in. I also noticed this. When I have lightening hooked to smoker and smoker hooked to the modem, I can't get to the internet until I restart eth2 which is what connects smoker to the modem. It acts like it is trying to use eth0 instead of eth2. The modem I have is a Motorola Netopia 2210-02. I took that info from the home page of the modem. Just looking at it, it's the little silver colored thing and I did pay almost $80.00 for that thing. It also says it has a DNS server and it is on. Thanks Dale :-) :-)
Re: [gentoo-user] Need networking help. Can't ping google.
=== On Fri, 12/10, Dale wrote: === The modem I have is a Motorola Netopia 2210-02. I took that info from the home page of the modem. Just looking at it, it's the little silver colored thing and I did pay almost $80.00 for that thing. It also says it has a DNS server and it is on. === Ok, that's good. Now just get a small (4 or 8 port) ethernet hub, and a few more CAT5 cables. Don't use the ethernet cable that came with the modem. Hook everything up to the hub (including modem) with the new CAT5 cables. On your hosts, emerge net-misc/dhcpcd and net-dns/openresolv. Clear everything out of /etc/conf.d/net file. Reboot your boxes. You should be good to go then. -- Keith Dart -- -- ~ Keith Dart ke...@dartworks.biz public key: ID: 19017044 http://www.dartworks.biz/ =
[gentoo-user] Need networking help. Can't ping google.
Hi, I got my system put together. I have booted a Gentoo 10 CD. This is the setup as far as the network goes. Internet DSL modem Gentoo rig named smoker New rig, no name yet. Lightening will work for now. ;-) I got it working from internet to modem to Gentoo rig as usual. I also can ping, BY IP, my Gentoo rig smoker from lightening. I cannot get smoker to resolve the traffic from Lightening to the internet. When I try to ping google, it sits there for a bit and I see traffic from Lightening on gkrellm but it never forwards to the internet. After a bit, it says ping: unknown host google.com. I'm pretty sure the issue is smoker. I went through this before and my old script doesn't work. Basically, smoker isn't forwarding the traffic from Lightening to the internet. I been following the home router howto and even turned the commands they list into s new script. Still no workey. This is from smoker: r...@smoker / # route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 192.168.1.0 * 255.255.255.0 U 20400 eth2 link-local * 255.255.0.0 U 1 00 eth0 loopback* 255.0.0.0 U 0 00 lo default 192.168.1.254 0.0.0.0 UG20400 eth2 r...@smoker / # I think this is the problem. Networking has always been a pain in the but for me. eth0 is the network for lightening to smoker. eth2 goes from Gentoo to the DSL modem. Need help. Ideas? Suggestions? Questions? Dale :-) :-) P. S. Rig is nice so far.
Re: [gentoo-user] Need networking help. Can't ping google.
=== On Thu, 12/09, Dale wrote: === bit, it says ping: unknown host google.com. === Your DNS (name resolution) is not configured. You ISP has probably provided a couple that you can use. Add the name server IP addresses to /etc/resolv.conf file. nameserver x.x.x.x -- Keith Dart -- -- ~ Keith Dart ke...@dartworks.biz public key: ID: 19017044 http://www.dartworks.biz/ =
Re: [gentoo-user] Need networking help. Can't ping google.
On Fri, Dec 10, 2010 at 2:06 PM, Dale rdalek1...@gmail.com wrote: Hi, I got my system put together. I have booted a Gentoo 10 CD. This is the setup as far as the network goes. Internet DSL modem Gentoo rig named smoker New rig, no name yet. Lightening will work for now. ;-) I got it working from internet to modem to Gentoo rig as usual. I also can ping, BY IP, my Gentoo rig smoker from lightening. I cannot get smoker to resolve the traffic from Lightening to the internet. When I try to ping google, it sits there for a bit and I see traffic from Lightening on gkrellm but it never forwards to the internet. After a bit, it says ping: unknown host google.com. So lightening talks through smoker right? That is, lightening is not connected to the modem? Is smoker running a DNS server? Does /etc/resolv.conf on smoker point to that local DNS server and lookups work? What is in /etc/resolv.conf on lightening? Is IP forwarding enabled on smoker? I'm pretty sure the issue is smoker. I went through this before and my old script doesn't work. Basically, smoker isn't forwarding the traffic from Lightening to the internet. I been following the home router howto and even turned the commands they list into s new script. Still no workey. If you're correct then ip forwarding is off; cat /proc/sys/net/ipv4/ip_foward should be 1. If its 0 then smoker is not routing, and you need to make it do that!
Re: [gentoo-user] Need networking help. Can't ping google.
Adam Carter wrote: On Fri, Dec 10, 2010 at 2:06 PM, Dale rdalek1...@gmail.com mailto:rdalek1...@gmail.com wrote: Hi, I got my system put together. I have booted a Gentoo 10 CD. This is the setup as far as the network goes. Internet DSL modem Gentoo rig named smoker New rig, no name yet. Lightening will work for now. ;-) I got it working from internet to modem to Gentoo rig as usual. I also can ping, BY IP, my Gentoo rig smoker from lightening. I cannot get smoker to resolve the traffic from Lightening to the internet. When I try to ping google, it sits there for a bit and I see traffic from Lightening on gkrellm but it never forwards to the internet. After a bit, it says ping: unknown host google.com http://google.com. So lightening talks through smoker right? That is, lightening is not connected to the modem? Right. Lightening connects to smoker and smoker connects to the DSL modem. Lightening connects to smoker on eth0 and smoker connects to the DSL modem through eth2. Is smoker running a DNS server? Does /etc/resolv.conf on smoker point to that local DNS server and lookups work? What is in /etc/resolv.conf on lightening? Is IP forwarding enabled on smoker? Smoker does not run a DNS server that I know of. Smoker's resolv.conf has 8.8.8.8 for the nameserver. I put the same in lightening too. Before when I did this, it resolved with the same DNS I use on smoker, 8.8.8.8. I always use it since it is faster than my ISP's DNS server. I'm pretty sure the issue is smoker. I went through this before and my old script doesn't work. Basically, smoker isn't forwarding the traffic from Lightening to the internet. I been following the home router howto and even turned the commands they list into s new script. Still no workey. If you're correct then ip forwarding is off; cat /proc/sys/net/ipv4/ip_foward should be 1. If its 0 then smoker is not routing, and you need to make it do that! ip_forward is set to one. Confirmed it with cat. I did this one time before. I found a iptables script and when I ran it, it just worked. The script is old and doesn't work anymore. The last time it was a gateway issue. I'm not sure this time. I did this. From smoker, I pinged google. I got the IP address from that. I then tried to ping google BY IP address on lightening. It gives me the error ping: unknown host 72.14.299.99. Does that give any clues? I'm sure this is something simple that I am missing. Again, I suck at networks. I'm a 1/2 watt light bulb on a bright sunny day on this. lol Thanks. Dale :-) :-)