LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   DNS resolves URL in two different ways? (https://www.linuxquestions.org/questions/linux-software-2/dns-resolves-url-in-two-different-ways-4175583553/)

jbruyet 07-01-2016 03:23 PM

DNS resolves URL in two different ways?
 
Hey all, I'm trying to get a program running on Ubuntu 14.04 LTS to update and it's not working. Tech support said that the problem is that my Ubuntu machine isn't connected to the internet. I said yes it is, they said no it's not. They sent me the URL that I need to connect to in order to get the updates, and I was able to ping it, but it resolved as something else. I ran nslookup on the URL and it resolved correctly. I double-checked Network Manager and the DNS servers are correct. I tried running ping and nslookup on my Windows 10 workstation and both resolve correctly. I took a look at my resolv.conf file and it's a little different from what I thought it should be:

Quote:

root@NamedOne:/# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search domain.com
root@NamedOne:/#
Shouldn't my actual DNS servers be listed here? Any ideas on what's going on?

Thanks,

Joe B

keefaz 07-01-2016 04:12 PM

How do you configure network, with network manager?

edit, lol yes sorry :)

Check carefully settings, is it dynamic (DHCP) or static IP?
Tried other dns servers? opendns, google...

For the generated resolv.conf, have a look at ' man 8 resolvconf ' as suggested, if you're curious

Habitual 07-01-2016 05:50 PM

Router?
I use Gurgle's DNS and L3 dns: eg:
8.8.8.8
4.4.2.2

fix you right up.

Sorry, One simply does not: Ping urls.

rknichols 07-01-2016 06:20 PM

"nameserver 127.0.0.1" means you are using a local caching nameserver, and in Ubuntu that's going to be dnsmasq. I can't figure out how the heck you're supposed to look at log files in Ubuntu 14 (there's no /var/log/messages and no journalctl command), but somewhere in there you should be able to find out to what upstream DNS server dnsmasq is forwarding requests. Why that would be wrong I have no idea, but that's a place to start looking. It should be the DNS server that that gave you your IP address in the response to your local dhclient's DHCP request.

hydrurga 07-02-2016 10:17 AM

I'm not sure if this is of use to you, but I'm using OpenDNS' DNS nameservers on Linux Mint. I did it as follows:

Code:

sudo kate /etc/resolvconf/resolv.conf.d/head
to add (ignore the warning in the file):

nameserver 208.67.222.222
nameserver 208.67.220.220

Code:

sudo resolvconf -u
This populates /etc/resolv.conf with the above DNS nameservers.

Might be worth a go as a remedial measure.

Habitual 07-02-2016 03:45 PM

<cough_cough>
Code:

sudo gksudo kate /etc/resolvconf/resolv.conf.d/head

hydrurga 07-02-2016 05:14 PM

Quote:

Originally Posted by Habitual (Post 5569471)
<cough_cough>
Code:

sudo gksudo kate /etc/resolvconf/resolv.conf.d/head

That's a nasty cough you have there. ;-)

Or kdesudo. But, strangely, sudo does work in this case on my Linux Mint 17.3 KDE system. I have no problem using it to open GUI applications. I haven't questioned why, maybe I should...

jbruyet 07-05-2016 02:58 PM

Well, I was just checking my other Linux servers and they are ALL resolving the vendor's site incorrectly. This is very frustrating because they are all using the same DNS servers as my Windows machines. And my Windows machines are all resolving the address correctly. I guess this is more than just an Ubuntu issue.

Thanks for all the help,

Joe B

jbruyet 07-05-2016 03:07 PM

Ok, I have to get this working so I just put their address in my hosts file and now it's working fine. I would REALLY like to know why this isn't working as it should...

Thanks,

Joe B


All times are GMT -5. The time now is 08:17 AM.