I'd like to post a solution to a problem I've encountered in my university. The issue is closely related to this post. I asked the user whether or not he found a solution but he never responded. In addition, I'm not sure whether or not this solution is case-specific or general.

The situation

In one of my university's buildings, public wi-fi would work only with ip addresses, but not with domain names. For instance, I could ping or go to google in firefox by ip address, but ping google.com or accessing google.com in firefox would not work.

The solution

I will post solution to my problem bellow. Feel free to add other responses or other solutions for other users who may encounter similar issues.

1 Answer 1


Once I've encountered this issue, I've been researching it for a while, and figured out that this may be dns problem. By reading this post, I've learned that there is number of ways to add or supersede the DNS servers provided by your network, however none of the solutions seemed to work. As user brad mentioned, dns is still being controlled by dnsmasq.

Now, by poking around config files in /etc/ I found the /etc/NetworkManager/NetworkManager.conf file, which had the following information:



I've changed the dns line, and now the file reads like this:



After restarting Network Manager with sudo service network-manager restart everything started working properly, and the solution still works after rebooting. Note: is OpenDNS public server.

What may have happened:

While on the network, the output of nm-tool was the following:


I believe, my uni has their own DNS server, which is and .10, and dnsmasq queries the closest one, so my requests never even got to

Hope this solutions helps to other users, and please let me know if my solution to this problem is valid, safe enough, or reasonable enough.

Concerning answering my own question:

I'm doing so to make this solution public and documented, at least for my particular case. Also I'd like to reference this post on meta.askubuntu.com.


Having returned home from uni today, I've discovered that I couldn't connect to my home wifi. I've read-up a little on man NetworkManager.conf and it turns out that dns= in [main] is actually a line for plug-ins, so line dns=dnsmasq is actually adding dnsmasq plugin to the network manager, apparently. So my solution still worked, just not as expected. Here'ss excerpt from the man page:

dns=plugin1,plugin2, ... List DNS plugin names separated by ','. DNS plugins are used to provide local caching nameserver functionality (which speeds up DNS queries) and to push DNS data to applications that use it.

So by setting dns= I may have, basically, prevented network manager from using that plug in, which would otherwise use local dns server (which apparently doesn't work).

Update #2:

What I've done so far is to comment out dnsmasq and ditch my internet service provider's DNS. Now, telling Network Manager is explained in this post, and it's a GUI method: simply open the Network Manager indicator, select "Edit Connections", open your network's name by pressing "Edit", and under IPv4 Settings tab, choose "Automatic (DHCP) addresses only ".

The very same thing can be done in command line , by editing a file for your specific connection stored in /etc/NetworkManager/system-connections. Bellow is the relevant portion of my connection file:



Now, with all these configurations (commented out dsnmaq plug-in from NetworkManager.conf and connection set to Automatic(DHCP) addresses only), I've basically achieved all that i was trying to get going all along - get my machine connect by domain names, and somehow get around using university's dns server, because that wone got me nowhere.

nm-tool confirms that I am using the DNS I wanted as well as dig google.com and /etc/resolv.conf.

This is the last update on this question/answer, and I don't plan adding anything else, but feel free to add any relevant information as a separate answer or in comments, as well as suggestions.

Hope this helps to other Ubuntu users, and Linux users in general !


  • 1
    You don't need to add that last paragraph. Answering your own question is a fairly standard practice all over Stack Exchange, and is encouraged unless the question is off-topic or violates some other norm.
    – muru
    Oct 28, 2014 at 22:24
  • @muru Thanks. I simply wasn't sure. I'll keep it in mind for future Oct 28, 2014 at 22:42

You must log in to answer this question.

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