| Linode Forum https://forum.linode.com/ |
|
| All invalid domains resolve to hostname?! https://forum.linode.com/viewtopic.php?f=19&t=4563 |
Page 1 of 1 |
| Author: | saman007uk [ Fri Aug 28, 2009 9:18 am ] |
| Post subject: | All invalid domains resolve to hostname?! |
Hi guys, Since yesterday, all invalid domains names seem to suddenly resolve to the server hostname. For example, consider "3321esddasd223a.com" - which does not exist. Dig confirms that it doesn't exist: Code: ; <<>> DiG 9.5.1-P3 <<>> 3321esddasd223a.com Yet, when I try to ping it just resoles to the server hostname: Code: root@server:~# ping 3321esddasd223a.com I don't have a name server installed, and the contents of /etc/resolv.conf and /etc/hosts look fine. Any ideas?! |
|
| Author: | Alucard [ Fri Aug 28, 2009 10:09 am ] |
| Post subject: | |
Post /etc/hosts ? |
|
| Author: | jsr [ Fri Aug 28, 2009 10:10 am ] |
| Post subject: | |
Take a look at your ping command, it is not resolving 3321esddasd223a.com, it is translating it to 3321esddasd223a.com.saman-gh.co.uk. I'm guessing you have your resolv.conf setup with a domain of "saman-gh.co.uk". I can see that you have a wildcard DNS for *.saman-gh.co.uk. So your server is checking <anything>.saman-gh.co.uk for a result and since that is a wildcard, it finds it. |
|
| Author: | mwalling [ Fri Aug 28, 2009 10:25 am ] |
| Post subject: | |
You have a search line in your resolv.conf |
|
| Author: | saman007uk [ Fri Aug 28, 2009 10:28 am ] |
| Post subject: | |
Thanks for the replies, jsr wrote: I'm guessing you have your resolv.conf setup with a domain of "saman-gh.co.uk". I can see that you have a wildcard DNS for *.saman-gh.co.uk. So your server is checking <anything>.saman-gh.co.uk for a result and since that is a wildcard, it finds it.
unfortunately, nope: Code: root@server:~# cat /etc/resolv.conf /etc/hosts: Code: 127.0.0.1 localhost keep the suggestions coming .... |
|
| Author: | jsr [ Fri Aug 28, 2009 11:01 am ] |
| Post subject: | |
From the resolv.conf man page: Code: If no domain entry is present, the domain is determined from the local host name returned by gethostname(); the domain part is taken to be everything after the first '.'. Finally, if the host name does not contain a domain part, the root domain is assumed. So your server is most likely setting a default search domain of "saman-gh.co.uk" even if you aren't specifying it. One of the easy fixes would be to just get rid of the wildcard DNS, if you are not using it. You could also make your hostname "server" instead of "server.saman-gh.co.uk". |
|
| Author: | saman007uk [ Fri Aug 28, 2009 11:16 am ] |
| Post subject: | |
Ah, many thanks for the explanation. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|