For the last several years, I've run dnsmasq on a small server to give me DHCP and DNS on my local network. The original server was Slackware-based and worked well. My server was in need of some hardware attention and I wanted to move it onto Ubuntu server (which I'm supporting for a couple of customers). While preparing the old server, I installed Ubuntu server 16.04 on a test box and set about configuring it to provide DHCP/DNS while the other server was being rebuilt.
I had some initial problems getting things set up (the Ubuntu server uses resolvconf, which got in the way initially). Got it working and pulled the original box to be rebuilt. I've now completed the hardware build and installed the latest Ubuntu server on it. I set up dnsmasq in the same way as I had set it up on the test box. Looked good - DHCP and DNS servers both working fine for the local network, everything looked good. Well, initially...
I've now found that if I attempt to SSH into the new server by name, I get permission denied. I've got SSH login set up for paired keys only, and the keys haven't changed. If I ssh in using the new server's IP, things work just as they should.
I've done an nmap scan on the network from the new server and I notice that while the other machines on the network are all resolved by name, the new server is only displayed by IP. It looks as though for some reason, it doesn't know its own name.
The configuration I'm using is quite simple (don't have terribly complex needs), but I've obviously got something set incorrectly.
/etc/dnsmasq.conf is as follows:
Code:
# Configuration file for dnsmasq.
domain-needed
bogus-priv
#resolv-file=/etc/nameserver.list
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:
Code:
# 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've also configured resolveconf using /etc/resolvconf/resolv.conf.d/base to add external nameservers:
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
This is essentially the same configuration I used on the test box, which is not showing this problem. I'm hoping someone can point out what I've missed in setting dnsmasq up under Ubuntu...