0

I am running Ubuntu 13.10, and since I set a static IP address inside a company network I cannot resolve domain names (e.g. google.com) anymore. This means I still can ping the IP address 8.8.8.8, but not google.com.

This Ubuntu 13.10 is run inside a virtual box in a windows environment (Windows 7), and with Windows I have no problem to ping google.com.

How to solve this problem? How and where to set/change the nameserver or anything relevant?

Additional information:

/etc/network/interfaces:

auto lo
iface lo inet loopback

/etc/network/interfaces:

# 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.0.1
0

It looks from what you posted that you use NetworkManager.

You have to work therefore on /etc/NetworkManager directory tree. There you should have a directory "system-connections" with all the connections of the system. Normally you would have an entry "Auto eth0" with the data of that "eth0" connection. There you could insert in the "[ipv4]" section something like:

dns=8.8.8.8;

Of course you can change this data also from the network configuration UI.

  • Thanks for your suggestion. If I understand you correctly, I need to change those files under /etc/NetworkManager when the NetworkManager is used? Changes to the file /etc/network/interfaces will then have no effect even when restarting the computer/device? Is that correct? – Alex Jan 13 '14 at 13:22
  • Yes you should change that files by hand if using NetworkManager. The /etc/network/interfaces is another set of script files that accomplish in general the same thing, but using them both is not a great idea since it may generate conflicts. So either stick to one or another for safety (and in case remove the NetworkManager pack if you use the interfaces one). – fede.evol Jan 14 '14 at 6:01
0

Recently, the package resolvconf, which used to be downloadable from the repos, has switched to installed by default in all Debian repos. This has the advantage that you can specify your DNSs in the /etc/network/interfaces file directly (since you are using a static IP) as follows:

    auto eth0 
    iface eth0 inet static
    address 192.168.73.25
    netmask 255.255.255.0
    gateway 192.168.73.1
    dns-nameservers 8.8.8.8 8.8.4.4 

The last line is what you are interested in. Reboot, you have your DNSs. Notice that the s at the end of dns-nameservers is not a mistake, and that you may specify as many DNSs as you like on the same line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.