Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My internet connection in Ubuntu 13.10 doesn't work. I can use IP addresses to open websites but not URLs. The DNS server that I connect to is the IP address of my Router. When I connect to the VPN of my employer I can access the web.

I found the following hint to resolve a similar problem on this post. It recommends typing

sudo mv /etc/resolv.conf /etc/backup.resolv.conf

to remove the resolv.conf file.

This made the problem even worse. When I now try to connect to the VPN it says

The VPN connection failed due to unsuccessful domain name resolution.

I am a rookie on Ubuntu and thus really lost. Any recommendations of what to do?

:~$ cat /etc/network/interface  
cat: /etc/network/interface: No such file or directory

:~$ cat /etc/resolv.conf  
cat: /etc/resolv.conf: No such file or directory

:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:21:cc:5f:25:5b  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:d2500000-d2520000 

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:884 errors:0 dropped:0 overruns:0 frame:0
          TX packets:884 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:69077 (69.0 KB)  TX bytes:69077 (69.0 KB)

wlan0     Link encap:Ethernet  HWaddr 8c:a9:82:a7:3e:da  
          inet addr:  Bcast:  Mask:
          inet6 addr: 2a02:908:f423:4f80:8ea9:82ff:fea7:3eda/64 Scope:Global
          inet6 addr: 2a02:908:f423:4f80:11ee:29c5:5d3b:588d/64 Scope:Global
          inet6 addr: fe80::8ea9:82ff:fea7:3eda/64 Scope:Link
          inet6 addr: 2a02:908:f423:4f80::/128 Scope:Global
          RX packets:61 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8738 (8.7 KB)  TX bytes:26478 (26.4 KB)
share|improve this question
Could you put here the output of "cat /etc/network/interface" and "cat /etc/resolv.conf" and "ifconfig". – piotrektt Dec 18 '13 at 19:41
Sorry, it takes me some time bcs I have to switch between Windows (where I have internet) and Ubuntu. First, I am using Cisco AnyConnect Secure Mobility Client. – Mike Dec 18 '13 at 20:00
The results to the second question are in the edited post above. – Mike Dec 18 '13 at 20:02
@piotrektt : do you have any ideas on the output above? thanks, mike. – Mike Dec 18 '13 at 21:27
Can you ping ? – Serg Aug 9 '15 at 8:42

Many routers do "DNS forwarding", meaning that they advertise themselves (via DHCP) as DNS servers, and then cache and forward any DNS requests from the internal network.

The first thing to ask is whether this only happens on Ubuntu or on another OS (Windows, Mac OS, Android, iOS) as well. From the looks of it, this will happen regardless of the OS, and the cause may be a misconfiguration in the router. So you can do two things:

  1. Configure your router properly. Log into its configuration page (check your manual for this), and configure a static DNS (Google's public DNS is a good choice, use, more here). Then have the computer reconfigure its interface via DHCP. You should then be able to properly resolve names.
  2. Configure the DNS address directly on the computer, bypassing the router. Click on the wireless/network icon on the top bar, then select "Edit Connections", grab the connection you're using, click "Edit". Then on the "IPv4 settings" tab, select "Automatic (DHCP) addresses only", and on the (just enabled) DNS Servers field enter

To diagnose which DNS server is resolving your names, open a terminal (ctrl-alt-t) and type dig, you should see diagnostic information about where your queries are being sent.

share|improve this answer
Hi roadmr, thanks for your answer. I do have internet on my windows OS though. Also, I have the problem with Ubuntu in other networks, e.g. at my girlfriend's place. – Mike Dec 18 '13 at 20:06
I have also entered in the DNS servers field as suggested and done the dig The result was ; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1 <<>> ;; global options: +cmd ;; connection timed out; no servers could be reached – Mike Dec 18 '13 at 21:28
can you ping -n if not, that would look like a routing problem instead. Can you add to your question, also, output of running route -n and traceroute -n – roadmr Dec 19 '13 at 18:56
I have pinged -n and it works: --- ping statistics --- 64 packets transmitted, 64 received, 0% packet loss, time 63101ms rtt min/avg/max/mdev = 51.704/55.799/107.821/6.776 ms – Mike Dec 21 '13 at 14:37

A friend of mine tried to help and he changed etc/resolf.conf to resolve urls into ip addresses via another server. nameserver nameserver

This worked briefly, but now it's back to not working. Trying to connect to my employer's VPN gives "The VPN connection failed due to unsuccessful domain name resolution".

There is now a second etc/resolf.conf file which is read-only and which has a different server address nameserver nameserver

Even using sudo gedit resolv.conf I cannot get to have just one resolf.conf specifying the different server my friend had used.

Are there any other suggestions of what to do with this problem for me? Help would be greatly appreciated...

share|improve this answer

Well i had the "The VPN connection failed due to unsuccessful domain name resolution" error on my archlinux, now it works for me. Firstly I installed openconnect and tried to connect via it. It connected successfully, but it didnt get the tunel working. So I tried the AnyConnect which led me to the error above. But openconnect address in CLI. The original was and i tried even with no success, and openconnect gave another,
I pasted it to AnyConnect window (without those pluses) and somehow it works!

Im sorry for my english and hope it will help you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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