Differences

This shows you the differences between two versions of the page.


dnsmasq [2015/08/06 20:43] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== dnsmasq ======
  
 +  * [[DNS]]
 +  * [[Avahi]]
 +  * [[Multicast DNS]]
 +  * [[launchctl]]
 +
 +dnsmasq is a small domain name server designed to resolve host names on a LAN.
 +
 +=== Wildcard Domains ===
 +
 +You may want to assign an actual domain to a hostname, to provide wildcard name resolution.
 +
 +An example would be that a host could be named ''server.local'', but ''*.server.local'' should also resolve to the same IP address.
 +
 +Add an extra domain to ''/etc/dnsmasq.conf'', and then restart the server.
 +
 +<code>
 +address=/.server.local/192.168.12.180
 +</code>
 +
 +OS X also uses mDNS to do hostname lookups, so you can add an entry for the server as well.
 +
 +==== OS X / homebrew ====
 +
 +dnsmasq can be setup to do wildcard DNS resolution natively, instead of updating an ''hosts'' file.
 +
 +First, install dnsmasq with homebrew:
 +
 +<code>
 +brew install dnsmasq
 +</code>
 +
 +Install the sample config file:
 +
 +<code>
 +cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
 +</code>
 +
 +Add this to configuration file to disable DHCP server, and resolve subdomains locally:
 +
 +<code>
 +no-dhcp-interface=
 +address=/.steve.beandog.org/127.0.0.1
 +</code>
 +
 +<code>
 +cp /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons
 +launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
 +</code>
 +
 +Configure OS X to resolv all ''*.name.beandog.org'' to use the localhost DNS server:
 +
 +<code>
 +mkdir -p /etc/resolver
 +echo nameserver 127.0.0.1 > /etc/resolver/name.beandog.org
 +</code>
 +
 +==== HOWTO ====
 +
 +== Remove a DHCP lease ==
 +
 +  - Stop ''dnsmasq''
 +  - Edit ''dhcpd.leases'' aand remove the entry
 +  - Start ''dnsmasq''

Navigation
QR Code
QR Code dnsmasq (generated for current page)