3

I'm unable to get my local DNS server to work and totally stumped. Here's what I have done so far to make it work...

Dnsmasq configured on Ubuntu 18.04 ( Static IP: 192.168.1.100)

/etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/dnsmasq.conf

domain-needed
bogus-priv

domain=example.dev
expand-hosts
local=/example.dev/

interface=enp4s0
listen-address=127.0.0.1

/etc/hosts

127.0.0.1   localhost
192.168.1.100   test
192.168.1.101   storage

Restarted networking services and dnsmasq

sudo /etc/init.d/networking restart  
sudo /etc/init.d/dnsmasq restart

Netstat confirms that Dnsmasq is listening on 53 as it should

netstat -an | grep 53.  
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN   

Configured my MacBook Pro to use the newly configured DNS server.

scutil --dns

DNS configuration

resolver #1
  nameserver[0] : 192.168.1.100
  nameserver[1] : 8.8.8.8
  flags    : Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)

Test host resolution using NSLookup

nslookup

> server 192.168.1.100
Default server: 192.168.1.100
Address: 192.168.1.100#53
> test.example.dev
;; connection timed out; no servers could be reached
Geary
  • 41
  • 1
  • 3
  • Your `netstat` output indicates that **dnsmasq** is only listening on TCP/53 while it should also listen on UDP/53. – Tommiie Dec 06 '18 at 22:59
  • Thanks Tom. It is actually listening on UDP 53 as wll. I just didn't include that from the netstat output. my bad. – Geary Dec 07 '18 at 17:58

0 Answers0