[Dnsmasq-discuss] dnsmasq problems under Ubuntu server 16.04

Paul Marwick paul.marwick at gmail.com
Mon May 22 17:14:14 BST 2017


I've used dnsmasq as a local network DHCP/DNS server for several years, 
running in a small Slackware based server. After a few initial set up 
problems, it worked flawlessly for years.

Recently I decided that I had to rebuild the server. It was running out 
of storage space and I was getting bored keeping Slackware updated. I 
decided on Ubuntu server as an easier option to keep up to date. To 
test, I installed Ubuntu server on a test box and set that up. Hit a 
problem initially due to the use of resolvconf, but eventually got it 
running.

I've just finished rebuilding the original server. When I installed 
dnsmasq, I used essentially the same setup files that I'd used on the 
test server. Unplugged the network connection to the test box, found 
that the local network was getting DHCP and DNS. However, when I 
attempted to SSH into the machine, I could not do so using the server 
name. I've got SSH access controlled by key pairs and that failed. On 
the other hand. if I SSH to the IP, the connection goes straight through.

Running an nmap scan from the new server suggests that the mahcine 
doesn't know its own name, which would explain the failure for SSH 
connect under the name.

I'm probably missing something simple, but I'd be grateful for any 
suggestions as to what is needed to correct the problem. I suspect its 
still down to the use of resolvconf, but I don't want to change too much 
in the basic Ubuntu setup, so I'd love to know what I've missed.

/etc/dnsmasq is as follows:

# Configuration file for dnsmasq.

domain-needed
bogus-priv
local=/ibmpeers.net/
domain=ibmpeers.net
expand-hosts
dhcp-range=192.168.1.100,192.168.1.200,12h

dhcp-host=00:01:d2:04:0b:d8,openwrt,192.168.1.92
dhcp-host=00:14:BF:70:9B:36,slug,192.168.1.91
dhcp-host=B8:27:EB:CE:03:4C,b2,192.168.1.90
dhcp-host=D8:5D:E2:6B:CE:BE,BRWD85DE26BCEBE,192.168.1.93
dhcp-host=28:32:c5:ae:d4:e4,humax,192.168.1.94
dhcp-host=50:f5:da:d4:a8:ef,Firestick,192.168.1.95

#listen-address=127.0.0.1
dhcp-option=option:router,192.168.1.254
dhcp-option=vendor:MSFT,2,1i
dhcp-authoritative

/etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp2s0
iface enp2s0 inet static
address 192.168.1.250
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
dns-nameservers 8.8.8.8 8.8.4.4 192.168.1.254
dns-search ibmpeers.net

I also configured the following nameservers to the /etc/resolv.conf.d/base:

nameserver 8.8.8.8
nameserver 8.8.4.4

I used essentially the same setup for the test server, and don't have 
the same problem with it, so I'd be grateful for any suggestions....





More information about the Dnsmasq-discuss mailing list