LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Problems with DNS resolving (various apps.) (https://www.linuxquestions.org/questions/debian-26/problems-with-dns-resolving-various-apps-353647/)

tomj88 08-15-2005 08:17 PM

Problems with DNS resolving (various apps.)
 
Hi,
I have been experiencing major problems with certain applications where they cannot resolve the IP's of domains properly, most of the time domains get resolved to 1.0.0.0 if it has not been added to /etc/hosts.
With apt-get I have to add all the url's from sources.list to /etc/hosts otherwise I cannot install problems. This is not a major problem, because I have less than 10 entries. Konqueror works fine, but epiphany and mozilla firefox aren't able to get any web site unless I specify the IP address. It is almost going to be impossible adding every single site to /etc/hosts.
I am using a D-Link 504t router to connect to the internet, which is where I believe that the problem lies. Does anyone have a solution to this problem? Could adding another DNS server address to /etc/resolv.conf (this currently only has the line: nameserver 192.168.1.1 in it) make a difference? If so, does anyone have a UK based address that I could use. Thanks alot for your help.

edit: Though I might add: Using Debian Sarge with 2.6.8-2-k7 kernel and kde3.4.1

maxfacta 08-15-2005 10:33 PM

The first point to confirm is, is 192.168.1.1 the address of your router?

Then, if so, is this a valid nameserver?
Use the host command (from the 'host' package.) to find out, eg

# host www.gnu.org
www.gnu.org CNAME gnu.org
gnu.org A 199.232.41.10
#

Or, for a non-existant nameserver, the result will be like:

# host www.gnu.org 192.168.1.112
Nameserver 192.168.1.112 not running
www.gnu.org A record not found at 192.168.1.112, try again
#

If the nameserver is not responding (then how in the world is Konqueror working?!), you will need to look into the configuration of your router. Most ADSL routers can act as caching nameservers. If your router is configured to connect to your ISP via DHCP, it should set itself up with your ISP's DNS settings when it connects.
This is assuming you are an ethernet client of your router. If your router is in 'bridged' mode, your /etc/resolv.conf should be automatically configured with your ISPs DNS settings, in which case there is something up with your pppoe configuration.

tomj88 08-15-2005 10:39 PM

Yes, my router is 192.168.1.1. I am pretty sure that it isn't running in bridged mode, and I am connected to it via ethernet. I am not using PPPoE, I am using PPPoA. Would it be worth looking at running it in bridged mode?

maxfacta 08-16-2005 03:34 AM

If your router is running in PPPoA mode, that's cool. I was referring to your Debian system running pppoe, as opposed to the router being in PPPo{A|E] mode.
This means your Debian system is a node on your ethernet, and your resolv.conf is correct. (Perhaps confirm this by posting the results of `ifconfig` and `route -n`. This will help identify if anything else is screwy with your config!)

Do you have any results from the `host` command?

tomj88 08-16-2005 07:24 AM

Code:

ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0B:6A:A5:C6:1D
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20b:6aff:fea5:c61d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26883 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25580 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21588699 (20.5 MiB)  TX bytes:2818702 (2.6 MiB)
          Interrupt:209 Base address:0xd400

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2729 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2449967 (2.3 MiB)  TX bytes:2449967 (2.3 MiB)

Code:

route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.1.0    0.0.0.0        255.255.255.0  U    0      0        0 eth0
0.0.0.0        192.168.1.1    0.0.0.0        UG    0      0        0 eth0

The host command just tells me the syntax is wrong. Is this a command to discover IP addresses? I tried:
Code:

host localhost
localhost has address 127.0.0.1

host google.com
google.com has address 216.239.39.99
google.com has address 216.239.57.99
google.com has address 216.239.37.99


maxfacta 08-17-2005 12:59 AM

Those results all look fine, and indicate that your DNS is set up properly (unless you have all 3 of those google entries in your hosts file!!)
So, the problem would seem to lie in the direction of your applications' configuration.

Do you use a proxy server? Are firefox and epiphany perhaps configured to use a proxy when they shouldn't be?

tomj88 08-17-2005 06:34 AM

No, Firefox is directed to connect directly to the internet and I assume Epiphany is too. Another problem I noticed is this: I can send an email from my hotmail account to my account on my email server, but when I try to send from my server to hotmail it does not resolve the address of hotmail and fails (this is the main reason why I haven't stopped using hotmail).

maxfacta 08-18-2005 12:13 AM

Hmm, I can't suggest any reason for some apps failing to resolve and others being able to!
Nothing silly like an ownership/permissions problem on /etc/resolv.conf?

I've got 2 thoughts:

apt-get update
apt-get upgrade

should ensure there's nothing silly going on with your libresolv install.

And/.or

Replace your nameserver entry with something external to your router. If that works, it'd look like some weird incompatibility with the nameserver implementation on your router, which was only tirggered by certain apps?! silly...

We have a number of V21 accounts in the UK, and I am able to use their nameserver just fine from here in Perth.
The primary and secondary we've been allocated are:

62.41.128.51
62.41.128.52

Alternatively, you might like to look up the nameservers which your ISP runs; they might be a little faster for you.
I'd be interested to know if using an alternate nameserver configuration allowed firefox to resolve!

tomj88 08-18-2005 07:09 AM

Thanks for those extra name servers, work a treat! I'm going to give my ISP a ring in a few minutes and ask for their nameservers, but those seem to be working fine. I am going to lay it down to a faulty or just plain shitty router (It's a D-Link 504T. If any one ever thinks of buying it, I don't suggest it). Thanks alot anyway maxfacta!

maxfacta 08-19-2005 04:41 AM

Very strange, that some apps could talk to your router's namerserver, and some couldn't...

You can in fact use pretty much any nameservers you like (some nameservers may block unknown clients), but it's almost sort of rude to just randomly load up some stranger's nameserver.
However, you are paying your ISP and that includes the use of their namerver, so it seems sensible to go with theirs :)

Don't forget to clear out all those static entires from your /etc/hosts file - they may mysteriously start to cause trouble some day!

wongdg 03-20-2007 08:56 PM

Apt-get returned invalid address 1.0.0.0
 
I have just resolved this issue of mine with apt-get update returning a junk address 1.0.0.0. Mine is due to a setting in my router, an Aztech by the way. I set the primary and secondary DNS address and also set the DNS server priority to be "user configured then automatic discover".

So the problem really was the router tried to be smart and found you some dumb addresses instead. Once configured right, you should be able to get the real address.

Hope it helps.

Cheers,
Wilson


All times are GMT -5. The time now is 12:21 AM.