1

I've recently upgraded my desktop from 12.04 to 14.04 and now my internet connection isn't working. I can access my router. I can go to Google by entering its IP address.

My resolv.conf file:

nameserver 8.8.8.8
nameserver 8.8.4.4

Per other instructions I've commented out dns=dnsmasq from /etc/NetworkManager.conf

[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

no-auto-default=00:19:66:45:52:39,

[ifupdown]
managed=false

If I don't have dns=dnsmasq commented out then my resolv.conf has this entry only:

nameserver 127.0.1.1

At this point I am dumbfounded because from everything I know DNS should be working. I'm grateful for any help.

P.S. I should add that prior to the upgrade I had an FTP server running on the desktop for sending images from an office scanner. The scanner can't find the FTP server. Other office computers (including my laptop running 12.04) can use the internet fine.

jkt123
  • 3,530
  • 22
  • 24

3 Answers3

2

Okay, I've got DNS working again. Since it appeared that DNS was being configured right I started wondering about iptables. I flushed the current iptables rules and DNS immediately began working. iptables -F However, the problem returns after rebooting. Now it appears to be a matter of making permanent edits to my iptables.

Apparently I had installed lokkit at some point in the past. I did a complete removal of lokkit and the problem was resolved over boot. I could tell that lokkit was involved because the output of sudo iptables -L included references to lokkit.

1

Do you have any particular reason to circumvent the use of dnsmasq? otherwise, I'd suggest reverting your changes to NetworkManager.conf and then reconfiguring the resolvconf package.

After that, you should be able to add your chosen DNS servers via the 'IPv4 Settings' tab of the nm-applet GUI, after changing the mode from 'Automatic (DHCP)' to 'Automatic (DHCP) addresses only'.

steeldriver
  • 136,215
  • 21
  • 243
  • 336
  • The only reason I tried circumventing dnsmasq is because elsewhere I saw posts about a similar problem with users reporting that disabling dnsmasq by the method I followed fixed their problem.

    I've uncommented out dnsmasq in NetworkManager.conf and followed the instructions to reconfigure resolvconf. No success.

    – Raymond Mutchler Apr 24 '15 at 00:00
0

Add your desired dns server to /etc/dhcp/dhclient.conf on the line saying supersede domain-nameserver. Separate by comas your dns addresses. Save the file and restart the network manager

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • I'll try it when I get back into the office, but I've looked in the same file on my laptop and can't find a supersede domain-nameserver line. Do I need to create it? – Raymond Mutchler Apr 24 '15 at 02:30
  • I'll add copy of my own file once I get home to my ubuntu laptop =) or you can look into similar questions on my profile - I posted before. I think if you do nl /etc/dhcp/dhclient.conf , that will be line 18 or 20 – Sergiy Kolodyazhnyy Apr 24 '15 at 02:33
  • I found in /etc/dhcp/dhcliet.conf the following line: #prepend domain-name-servers 127.0.0.1; I changed it to: prepend domain-name-servers 127.0.0.1, 10.1.10.1, 8.8.8.8, 8.8.4.4; I then restarted network-manager. The resolv.conf file changed from: nameserver 127.0.1.1 to nameserver 10.1.10.1 nameserver 8.8.8.8 nameserver 8.8.4.4 The problem persists. Note, the reason why I put 10.1.10.1 first is because that's the DNS for my laptop when it's connected wirelessly on the same network. – Raymond Mutchler Apr 24 '15 at 16:15
  • By the way, I can ping all of these DNS addresses without any problems. I really don't know what gives here. DNS appears properly configured in /etc/resolv.conf and my system can reach those addresses, but DNS doesn't work. – Raymond Mutchler Apr 24 '15 at 16:21
  • I've also tried changing prepend to supersede. I've also tried using only one DNS address. Again, no resolution in either case. – Raymond Mutchler Apr 24 '15 at 18:05