3

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:127.0.0.1  Mask:255.0.0.0
          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:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0
          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
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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)
5
  • Could you put here the output of "cat /etc/network/interface" and "cat /etc/resolv.conf" and "ifconfig".
    – piotrektt
    Dec 18, 2013 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, 2013 at 20:00
  • The results to the second question are in the edited post above.
    – Mike
    Dec 18, 2013 at 20:02
  • @piotrektt : do you have any ideas on the output above? thanks, mike.
    – Mike
    Dec 18, 2013 at 21:27
  • Can you ping 8.8.8.8 ? Aug 9, 2015 at 8:42

2 Answers 2

0

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 8.8.8.8, 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 8.8.8.8.

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

4
  • 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, 2013 at 20:06
  • I have also entered 8.8.8.8 in the DNS servers field as suggested and done the dig www.yahoo.com. The result was ; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1 <<>> www.yahoo.com ;; global options: +cmd ;; connection timed out; no servers could be reached
    – Mike
    Dec 18, 2013 at 21:28
  • can you ping -n 8.8.8.8? 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 8.8.8.8?
    – roadmr
    Dec 19, 2013 at 18:56
  • I have pinged -n 8.8.8.8 and it works: --- 8.8.8.8 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, 2013 at 14:37
0

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 vpn.address.cz and i tried even https://vpn.address.cz with no success, and openconnect gave another, https://vpn.address.cz/+webvpn+/index.html
I pasted it to AnyConnect window (without those pluses) and somehow it works!

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

Not the answer you're looking for? Browse other questions tagged .