brew install dnsmasq

 

sudo vim /usr/local/etc/dnsmasq.conf
bogus-priv
local=/lan.hensler.net/
domain=lan.hensler.net
expand-hosts
listen-address=127.0.0.1
listen-address=10.0.29.150

 

sudo vim /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

10.0.29.60 hostname

 

/etc/resolv.conf
domain lan.hensler.net
nameserver 127.0.0.1
nameserver 62.2.17.60

 

dig lan.hensler.net
; <<>> DiG 9.9.11 <<>> lan.hensler.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 32259
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;lan.hensler.net. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Dec 02 17:59:21 CET 2017
;; MSG SIZE rcvd: 33

 

scutil –dns
resolver #1
search domain[0] : lan.hensler.net
nameserver[0] : 127.0.0.1
nameserver[1] : 62.2.17.60
flags : Request A records, Request AAAA records
reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address)

 

sudo brew services restart dnsmasq

 

Leave a Reply

Your email address will not be published. Required fields are marked *