dnsmasq and resolvconf

Bug #955785 reported by Asmo Koskinen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

This is updated Ubuntu 12.04.

I use ltsp-server-package, not ltsp-server-standalone.

I have installed dnsmasq and followed this howtos:

https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/
http://wiki.debian.org/NetworkConfiguration#The_resolvconf_program

Thin client boots very nicely, but there are no dns services:

root@lubuntu:~# cat /etc/resolv.conf
# 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

I use one nic:

root@lubuntu:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
 address 192.168.100.10
 netmask 255.255.255.0
 network 192.168.100.0
 broadcast 192.168.100.255
 gateway 192.168.100.1
 dns-nameservers 8.8.8.8 8.8.4.4

I can ping, but not with domain names:

root@lubuntu:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=43 time=51.2 ms

root@lubuntu:~# ping google.com
ping: unknown host google.com

My base is filled:

root@lubuntu:~# cat /etc/resolvconf/resolv.conf.d/base
nameserver 8.8.8.8
nameserver 8.8.4.4

How I make dns works in ltsp server with dnsmasq? I do not want go back
to use two nics and ltsp-server-standalone.

root@lubuntu:~# dpkg -l | grep dnsmasq
ii dnsmasq 2.59-4
             Small caching DNS proxy and DHCP/TFTP server
ii dnsmasq-base 2.59-4
             Small caching DNS proxy and DHCP/TFTP server
root@lubuntu:~# dpkg -l | grep resolvconf
ii resolvconf 1.63ubuntu9
             name server information handler

Best Regards Asmo Koskinen.

Revision history for this message
Marco Menardi (mmenaz) wrote :

don't use base, that as far as I've understand is used only if nothing else is available. I've added my config in "tail" file.
dnsmasq hooks will at nameserver 127.0.0.1 "automagically" right after the content of the "head" file when creating /etc/resolv.conf, so you don't need to do it yourself (just restart dnsmasq everytime you want to regenerate /etc/resolv.conf for testing)

Revision history for this message
Asmo Koskinen (asmok) wrote :

Yes, thank you Marco. I know it now; tail is the file for added info about dns servers.

Best Regards Asmo Koskinen.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Is dnsmasq running? Please copy the output of 'ps -ef | grep dnsmasq' ; If so, can you please attach its configuration file (usually /etc/dnsmasq.conf)?

In this case here tail isn't being used; resolvconf only contains 127.0.0.1. If dnsmasq doesn't have the required configuration to resolve google.com; this would explain why you can't ping the name directly.

Changed in ltsp (Ubuntu):
status: New → Incomplete
Revision history for this message
Thomas Hood (jdthood) wrote :

Marco in #1> don't use base, that as far as I've understand is used only if nothing else is available.

Asmo in #2> thank you... tail is the file for added info about dns servers

It sounds as if both of you are a little bit confused about the use of these files. Please read resolvconf(8).

Addresses from "base" don't appear in resolv.conf if one of the available nameservers is at 127.0.0.1. It's the presence of address 127.0.0.1 that explains why 8.8.8.8 and 8.8.4.4 were not listed in /etc/resolv.conf.

For interfaces brought up with ifup(8), /etc/network/interfaces is the right place for nameserver information, not the "base" or "tail" files.

The configuration originally posted by Asmo was only incorrect insofar as nameserver addresses were unnecessarily present in "base". It would have sufficed to put those addresses only in /etc/network/interfaces.

The presence of 127.0.0.1 in Asmo's resolv.conf indicates that dnsmasq had been started and had registered its address with resolvconf. Resolvconf should have sent the addresses 8.8.8.8 and 8.8.4.4 to dnsmasq so that dnsmasq could use them as the addresses to forward queries to.

That this did not occur indicates that either dnsmasq was not running or that some other abnormal condition existed.

Asmo: Can you reproduce the problem? Please delete the base and tail files, restore the dns-nameservers line in /etc/network/interfaces to how it was when you submitted this report, see if name resolution works (yay -- report this) or is broken, in which case please send the contents of /etc/resolv.conf and /var/run/dnsmasq/resolv.conf and the output from "ps -elf | grep dnsmasq".

I am assuming that you are not using NetworkManager. Please send the output of "dpkg -l network-manager" and "ps -elf | grep -i networkmanager" so we can be sure.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ltsp (Ubuntu) because there has been no activity for 60 days.]

Changed in ltsp (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.