dns lookup by web browser is wrong

Asked by lpd

If hostname is "ubuntu" and http address is banana.ubuntu.com I get a normal message that the site does not exist.

If hostname is "ubuntu.mydomain.org" (my own domainname that is...) and http address is banana.ubuntu.com I see, using tcpdump that Firefox/Konqueror/Opera tries to reach banana.ubuntu.com.mydomain.org, this leads up to a message from my domain registrar that the domain I tried to reach is indeed registred with them (http://banana.ubuntu.com is visible in the browsers address field so you'd think that's where you are... but you're not... you're at banana.ubuntu.com.mydomain.org).

How to correct this? Is this even a bug?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
lpd
Solved:
Last query:
Last reply:

This question was originally filed as bug #373908.

Revision history for this message
Vladimir Osintsev (osintsev) said :
#1

This is not a bug. There are several factors that give this effect - mydomain.org is really present and have wildcards in DNS configuration, this means that really-does-not-matter-what.mydomain.org will always resolve to the IP of your registrar. You can remove the 'search' and 'domain' directives from /etc/resolv.conf - I think it the easiest way.

Revision history for this message
lpd (danbod) said :
#2

My /etc/resolv.conf looks like this:

# Generated by NetworkManager
nameserver x.x.x.x
nameserver x.x.y.x

No 'search' and 'domain' directives visible here. I am not sure I understand what you mean. Is something missing from my /etc/resolv.conf file?

Regarding my DNS service provider, I will make a change to the *.mydomain.org post in the DNS, and try to visit banana.ubuntu.com again - without going bananas.

Revision history for this message
lpd (danbod) said :
#3

Solved I guess. Removing the *.mydomain.org post in my DNS fixed my issue.

Although whilst running tcpdump and visiting banana.ubuntu.com again, tcpdump shows that Ubuntu tries to reach banana.ubuntu.com.mydomain.org. I gather that this is normal behaviour.

I am satisfied with the answer and my problem is resolved. Thank you Vl. Osintsev. I will dig in and read about the 'search' and 'domain' directives in /etc/resolv.conf also.