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:
root@smoker / # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.1.0 * 255.255.255.0 U 204 0 0 eth2
link-local * 255.255.0.0 U 1 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.254 0.0.0.0 UG 204 0 0 eth2
root@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.
===
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/>
=====================================================================
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.
On Fri, Dec 10, 2010 at 2:06 PM, Dale <rdale...@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!
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".
===
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
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
:-) :-)
===
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.
<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