LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   No internet, but pings gateway fine (https://www.linuxquestions.org/questions/linux-networking-3/no-internet-but-pings-gateway-fine-79066/)

nateinabox 08-04-2003 10:36 PM

No internet, but pings gateway fine
 
I just installed Mandrake Linux 9.1 yesterday and I've encountered some networking issues which are driving me insane. Anyone who can offer any insight, it would be much appreciated.

I've connected my usb pocket ethernet network card to my system, and Linux recognizes the card and has drivers for it. The DHCP from my router appears to be working, it's been assigned an IP. I can ping the loopback fine (127.0.0.1) and I can ping the router fine (192.168.0.1), but when I try to use the internet with the browser, it doesn't work.

eth0 is up and working fine on 192.168.0.6 (DHCP from the router).

My friend was mentioning that I need to mess with the DNS settings, but I couldn't figure out how to do that.

I checked the routing using "netstat -r", but I didn't really understand the numbers since it responded that the eth0 destination was 192.168.0.0. It has a second entry for eth0 that says 'default' for the destination, and 192.168.0.1 for the gateway, which seems correct, but the subnet mask there is 0.0.0.0

destination Gateway Genmask Flags MSS
192.168.0.0 * 255.255.255.0 U 0
127.0.0.0 * 255.0.0.0 U 0
default 192.168.0.1 0.0.0.0 UG 0

Window irtt Iface
0 0 eth0
0 0 lo
0 0 eth0

I've tried to stay away from the KDE tools (Mandrake Control Center) because they don't seem to do anything that's helping at the moment. I don't know that many console commands yet though, as this is all pretty new to me. Thanks in advance.

ppuru 08-04-2003 10:48 PM

have you tried pinging an external ip? Try pinging 216.109.127.60 (which is mail.yahoo.com)

If you are indeed able to ping using an IP, you can train your efforts on DNS.

Important files are

/etc/resolv.conf that tells your resolver which DNS to use to resolve hostnames to ip
/etc/named.conf and files in /var/named - in case you want to use your own DNS.

some good help here
http://www.ibiblio.org/pub/Linux/docs/HOWTO/DNS-HOWTO
and in
RedHat Customization Guide.

fulcrum 08-04-2003 10:49 PM

In order to figure out whether you need to mess with the DNS settings, try pinging the IP address of a remote site (instead of the domain name). For example, ping 216.239.39.99 for www.google.com.

If you get a response then the problem is the DNS entries. To fix that edit the /etc/resolv.conf to add the IP address of the DNS server and the search paths.

thundersnows 08-04-2003 10:56 PM

hi,
i got almost the same problem like this.
but my problem is, i want to connect my computer to win2000 server, so i can have internet access.
i've tried to ping public ip and no response.
but i can ping to other computer in my network (win98). so what's the problem ?

nateinabox 08-04-2003 11:10 PM

Yep, you guys were right about the DNS for my problem. The public ip's pinged out fine.

I'm going to look up some DNS stuff and see if I can figure out how to edit that file. That ibiblio site link doesn't seem to be working for me at the moment though. Thanks for the help ppuru and fulcrum.

nateinabox 08-04-2003 11:45 PM

Ok, I edited my /etc/resolv.conf. It already had information in there regarding what I would assume is the domain. I have socal roadrunner as my ISP (socal.rr.com), so that's the information that was there. I added a domain line to the resolv.conf file, but still nothing from the web browser.

Here's what the resolv.conf looks like now. Tell me if something looks wrong.

domain socal.rr.com
search socal.rr.com
nameserver 192.168.0.1

ppuru 08-05-2003 12:05 AM

Does 192.168.0.1 have a DNS service running?

You can try using the DNS address of your ISP which dig reports as

24.30.200.3 (dns1.rr.com)

nateinabox 08-05-2003 12:20 AM

192.168.0.1 doesn't have a DNS service running. I put it there in a vain attempt to find a service that does do DNS, but I can't seem to find any information on what DNS routing IP I should use for my ISP.

I tried inputting the rr DNS address that you gave, but it still gives the same response, with no internet.

Here's my current resolv.conf:
search socal.rr.com rr.com dns1.rr.com
nameserver 24.30.200.3

ppuru 08-05-2003 12:32 AM

you can do away with

search

but that is not going to resolve your problem.

Are you able to ping the nameserver (24.30.200.3)?

Also, from your shell prompt, try

dig A www.yahoo.com @24.30.200.3

karaf 08-05-2003 12:40 AM

Hi,

I'm having the EXACT same issue as Nateinabox. I installed RedHat Linux 9 today. I have a router as a DHCP server, and it is assigning an IP just fine. I can ping my local lan, and external ip addresses. BUT, I cannot resolve addresses (eg: ping novell.com does not work, nor can I run Mozilla on the internet.)

I left the localhost line in my /etc/hosts file (as RedHat tells you to do), but there is no corresponding nameserver entry in the /etc/resolv.conf for 127.0.0.1. Is this the problem? I thought that would be put in by dhclient-script...???

Just like nateinabox, my resolv.conf has the ip addresses of my ISP DNS Servers listed (as fed to my Linux box by the router during startup), but it's not using those servers to resolve addresses.

Argh.

Any help is sincerley appreciated!

KARAF

HappyDude 08-05-2003 12:44 AM

Try putting 192.168.1.1 in the primary DNS spot. For some reason its requiered for a static IP behind a Linksys router.

karaf 08-05-2003 12:46 AM

Quote:

Originally posted by ppuru
>Also, from your shell prompt, try
> dig A www.yahoo.com @24.30.200.3
I tried this just now. "Connection timed out, no servers could be reached."

mmmmmmmmmm.......

KARAF

karaf 08-05-2003 12:49 AM

Quote:

Originally posted by HappyDude
Try putting 192.168.1.1 in the primary DNS spot. For some reason its required for a static IP behind a Linksys router.
HappyDude,

Is that your router's ip address? My SMC uses 192.168.123.254. Should I use that?

And I apologize for this STUPID question (long time since I was doing Unix administration), where is the "primary DNS spot"? You mean in resolv.conf?

Thanks,

KARAF

nateinabox 08-05-2003 12:52 AM

I pinged 24.30.200.3, but it couldn't find it (unknown host). The same thing happened with the dig command. I then tested one of the other public addresses listed earlier, and those still work, so I'm still connected.

I tried plugging in the 24.30.200.3 address through my Internet Explorer on my Windows machine, and the address came up not found, as well as the dns1.rr.com address and all variations I could think of. I know it exists, but I don't know why IE wouldn't be able to find that 24.30.200.3 address.

Btw Happydude, I put in the 192.168.0.1 address (my router address) into my /etc/resolv.conf, and it didn't help any. Perhaps it wasn't the "primary" space that karaf was talking about...

karaf 08-05-2003 01:10 AM

Quote:

Originally posted by nateinabox
I pinged 24.30.200.3, but it couldn't find it (unknown host).
MMMMmmmm. I was able to ping it fine.

Quote:

I tried plugging in the 24.30.200.3 address through my Internet Explorer on my Windows machine, and the address came up not found
Very strange. It said "refused connection" to me. The dig command timed out though.

Quote:


I put in the 192.168.0.1 address (my router address) into my /etc/resolv.conf, and it didn't help any.

Actually, when using DHCP, the dhclient-script is supposed to prefill /etc/resolv.conf for you, so in theory, any changes you make will be overwritten anyways. Hence my confusion at his suggestion.

:confused:

Strange issue, but never say die!

KARAF

ppuru 08-05-2003 01:12 AM

can you post the output of your ping to www.yahoo.com while /etc/resolv.conf has nameserver=24.30.200.3.

nateinabox 08-05-2003 01:29 AM

Hmm well scratch that last post I made. In my staring at the screen for hours and hours today, I was one number off on the dns1.rr.com ip address (24.30.300.3 instead of 24.30.200.3 - stupid me).

24.30.200.3 pinged fine.
'A dig www.yahoo.com @24.30.200.3' seemed to work too. It returned a bunch of answers relating to the www.yahoo.com address. Question section, answer section, authority section, etc... It seems to be working.

So 24.30.200.3 is working with the dig function, I can ping 24.30.200.3, and it's in my resolv.conf file. Still no internet.

ppuru 08-05-2003 01:53 AM

now can you ping www.yahoo.com or dns1.rr.com by their names?

nateinabox 08-05-2003 02:02 AM

In the console, I pinged www.yahoo.com, but it said unknown host.

When I ping dns1.rr.com it returns fine. Isn't that because the dns1.rr.com address is identified in my /etc/resolv.conf?

nateinabox 08-05-2003 02:04 AM

Ok when I ping yahoo.com without the 'www' then it pings fine.

Still no internet.

ppuru 08-05-2003 02:08 AM

By no internet, do you mean you are not able to browse?

Looking_Lost 08-05-2003 02:13 AM

You could try turning everything off, plug your network card directly into the modem, turn on the modem then turn the computer on and see if the same problem persists when you are directly connected to the modem with nothing inbetween.

nateinabox 08-05-2003 02:17 AM

ppuru - yes, that means I can't browse through Konqueror.

Looking_Lost - I'll try that and see, but if it works, how does that solve my router issue?

---edit---
I tried pinging some other addresses (google.com, etc) and got no response. Maybe I only got a ping off yahoo.com because I ran the dig command?

Looking_Lost 08-05-2003 02:20 AM

It doesn't but it eliminates it one way or the other


If it works directly connected to the modem it's probably something to do with the router

If it's exactly the same then, well it isn't your router

Just eleminating things.

ppuru 08-05-2003 02:20 AM

As you are able to ping to the internet, this does not seem a router issue anymore.

does your router have some kind of firewalling?

Check the settings on your Konquererer.

If you have lynx or links (text based browsers) installed, you can try browsing through that just to troubleshoot.

nateinabox 08-05-2003 02:43 AM

I'm only able to ping to the internet with IP addresses or a DNS after I run the dig command on a particular DNS address. It remains that I still cannot ping DNS addresses from scratch.

My router doesn't have any firewall besides what is default in the router itself being a firewall. I can open all the ports if you think that will make a difference.

I looked through Konquerer and could not find any settings that should be influencing my ability to browse the internet.

I used Links and it could not find www.yahoo.com. It did find help.rr.com however (Konquerer could not find help.rr.com). I couldn't find any random with Links though. I also tried connecting to Google's direct IP address (216.239.39.99), but the browser just hangs (I can ping that address fine).

Pinging yahoo.com again, there is no response now. It returns "unknown host". Now I'm becoming far more confused. Pinging the rr.com addresses return fine.

HappyDude 08-05-2003 02:45 AM

Quote:

Originally posted by karaf
HappyDude,

Is that your router's ip address? My SMC uses 192.168.123.254. Should I use that?

And I apologize for this STUPID question (long time since I was doing Unix administration), where is the "primary DNS spot"? You mean in resolv.conf?

Thanks,

KARAF

Well in redhat theres a GUI configuring utility for the network and if I give myself a static IP instead of a dynamic IP i need to specify the DNS address. I guess that it doesn't apply to you. Oh well.

ppuru 08-05-2003 02:49 AM

nateinabox

Does your router have some filtering/firewalling feature?

I am not sure whether this will work but...

Try giving the IP address of your router as the ProxyServer in Konquerer configuration and try browsing.

nateinabox 08-05-2003 03:06 AM

There are no additional filtering features that are turned on, and there is no firmware firewall features besides that of the router itself acting like a router should.

I tried using the router as the ProxyServer. It didn't do anything. It just times out basically.

Here's more for you to chew on though. I DMZ'd the router, and I can access help.rr.com through Konquerer (without the proxy router trick), but nothing else. I tried accessing pages from their IP addresses (like Google), but it just hangs, not finding anything.

It seems there's a combined problem with my router and my DNS routing.

Looking_Lost 08-05-2003 04:41 AM

I'd still do what I suggested before - connecting directly to the modem and getting all your settings as normal via dhcp.

If that works then you know for definite you have a fully functional dhcp enabled client

Then look at the routers internal settings, sometimes just turning them off for a minute helps clear up problems.

karaf 08-05-2003 12:52 PM

Quote:

Originally posted by HappyDude
Well in redhat theres a GUI configuring utility for the network and if I give myself a static IP instead of a dynamic IP i need to specify the DNS address. I guess that it doesn't apply to you. Oh well.
No, it DOES apply to me. I'm just a little braindead after midnight sometimes. :scratch:

I tried your suggestion, and I checked SMC's website. No go. Even SMC says to just put the DNS servers that the router uses in the Linux DNS table. But given that DHCP automatically does it, that's not the problem. (DHCP also overwrote the router's DNS server entry I manually put in. I'm hesitant to override the router's defaults and put in my own permanently...)

Could it be in the /etc/hosts file? Do the DNS servers need to be in there? What HAS to be in there?

KARAF

karaf 08-05-2003 01:38 PM

One other thought... Could this be a ports issue? As Nateinabox asked earlier. Does DNS on Linux require any special ports that Windows doesn't require? (53 is already open) I know things work fine for my Windows boxes. This points to a problem specific to my Linux setup for sure...

Another hint is when running "host" or "dig", it ALWAYS comes back and says "no servers could be reached". So... ***it's not even reaching the DNS servers*** Security setting?

Thanks again everyone,

KARAF

nateinabox 08-05-2003 04:07 PM

Well I'm pretty sure it has to be a ports issue in addition to whatever other problems I'm having. When I opened all the ports on that computer through the router by DMZ'ing it, I could actually reach help.rr.com through the graphical browser, Konquerer. That however, was the only website I could reach. I'm wondering if there's something screwy with the dns1-4.rr.com DNS nameservers.

All my "dig" functions seemed to work fine when I attached the @24.30.200.3 to the search (ie: dig A www.google.com @24.30.200.3). Is there any kind of firewall setting that would be part of Mandrake Linux that I don't know about? I didn't install any, because I just wanted to get the system running first.

I'm going to try hooking my computer up directly to the cable modem now to see what happens.

nateinabox 08-05-2003 06:48 PM

Hooked the computer up directly to the cable modem, and got nothing. My friend gave me the suggestion that it's possible that stupid USB card is not completely compatable with Mandrake Linux. I don't want to give up on this, but I'm running out of options for making it work.

ppuru 08-06-2003 02:35 AM

When you connect your cablemodem directly, you will need to change the ip parameters. You would need to configure the system to get ip parameters from your ISP's DHCP server.

Hope you took care of that.

fulcrum 08-06-2003 01:08 PM

The /etc/hosts file serves as a local DNS table, if you have specified that 'file' will be searched first in the DNS search order then the /etc/hosts file will be looked up for the required entry.

The DNS server should not be in the /etc/hosts file, they should only be in the /etc/resolv.conf file.

I am a little bit confused about your setup though. What is the computer address and the router address?

How does your router get its IP addresses? Most of them act as a DHCP client when they are talking to the ISP, and as a DHCP server when they are talking to the LAN.

Make sure that the IP addresses that the router gets are correct. Then check the settings on your computer. You should get the same DNS IP addresses on you computer as the router has gotten.

nateinabox 08-06-2003 02:52 PM

ppuru - I changed the IP parameters so it would accept the DHCP from my ISP, but perhaps I did it wrong. I left the previous DNS nameserver addresses that I specified in the /etc/resolv.conf file.

fulcrum - As far as I know, there is no DNS server in the /etc/hosts file. The computer address is 192.168.0.6 and the router is 192.168.0.1 (which I also have specified as the gateway). The router gets the actual ISP IP addresses through DHCP; that's what the firmware is set to right now, so like you said, that would be the DHCP client. It also assigns all the network IPs to the computers here on the LAN.

Fulcrum, are you saying that I need to have my real online ISP IP address for the computer? (ie: 24.x.x.x) I'm not sure I understand that last part you were talking about.

fulcrum 08-06-2003 03:48 PM

I am sorry for not being completely clear!! :)

What I was trying to suggest is that you verify that the DNS entries that the DHCP client on your computer gets from the router are the same as the addresses that the DHCP client on the router get from the ISP. They should match for the DNS to work on your computer.

Try the following setup and see if it works - on the computer, set the ip address as static, the gateway as the router, and the dns servers as the ip addresses of the ISP DNS servers.
Then on the router, configure the IP address of the computer as reserved or static, or whatever the router configuration allow.

If this works then that most likely means that there might be a problem with the way the DHCP server on the router gived the DNS ip addresses to the clients.

karaf 08-06-2003 05:14 PM

FOUND PROBLEM!!!
 
I found the answer! Well, I found someone else with the same problem who found the answer...

On the JustLinux forum, Starbuck said:
Quote:

WooHoo! turning off firewall and starting network services did the trick. Finding them was the problem. I'm sure I'll be back with many questions. also gave it static IP addresses.
I went to static IP and turned off my firewall, problem fixed. (Good thing I'm behind a router/firewall.) Actually, I turned DHCP back on, all is still well. So it is a FIREWALL issue!

The question is, WHY does this fix it? Is it a bug in the Linux firewall? I mean, why do I need to allow INCOMING traffic on various ports for "dig" and internet to resolve addresses? I can't believe that resolving DNS addresses is a security risk...

Strange... but THANKS everyone for all the help.

Karaf

hsousa 08-07-2003 06:03 PM

yo no se escribir ingles muy bien asi que lo voy a tratar de explicar en espaņol y si alguien de aqui sabe hagame el favor de traducirlo y voy a hacer muy breve... espero.

Yo tenia el mismo problema con un REDHAT y me acorde que mi proveedor de ISP me dio un programita para cambiar el valor del MTU de mi IP por 1492

Asi que solo puse

ifconfig eth1 mtu 1492

y con esto resolvi el problema

I really hope that you understand me, if not just email me and i will try to explain

yocompia 08-07-2003 07:04 PM

yo no se escribir ingles muy bien asi que lo voy a tratar de explicar en espaņol y si alguien de aqui sabe hagame el favor de traducirlo y voy a hacer muy breve... espero.

= i don't know how to write very well in english, but i'm going to try to say it in spanish and if anyone can do me the favor of translating, i'll be brief... hopefully.

Yo tenia el mismo problema con un REDHAT y me acorde que mi proveedor de ISP me dio un programita para cambiar el valor del MTU de mi IP por 1492

= i had the same problem with redhat and i remembered that my ISP gave me a procedure for changing the MTU value of my IP to 1492.

Asi que solo puse

= and then i only issued

ifconfig eth1 mtu 1492

y con esto resolvi el problema

= and that fixed the problem

I really hope that you understand me, if not just email me and i will try to explain

translation is rough, forgive me,
y-p


All times are GMT -5. The time now is 05:35 PM.