Created
January 14, 2012 23:23
-
-
Save cee-dub/1613339 to your computer and use it in GitHub Desktop.
Generic configuration files for *.#{hostname}.local wildcard DNS with dnsmasq and mDNSResponder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add domains for which you want to force to an IP address here. | |
# This is the magic sauce for making *.#{hostname} | |
# always route to the localhost | |
address=/#{hostname}/127.0.0.1 | |
address=/#{hostname}/::1 | |
mx-host=#{hostname},#{hostname},10 | |
# Extra options that make dnsmasq play nice | |
log-queries | |
# Never forward plain names (without a dot or domain part) | |
domain-needed | |
# Never forward addresses in the non-routed address spaces. | |
bogus-priv | |
# Don't read /etc/resolv.conf or any other resolver files to | |
# find upstream DNS servers | |
no-resolv | |
# Listen only on loopback interface, on non-privileged port | |
# 5253 as an homage to Multicast DNS (mDNS) using 5353 UDP | |
port=5253 | |
listen-address=127.0.0.1 | |
listen-address=::1 | |
# Provide only DNS service, disable DHCP and TFTP | |
no-dhcp-interface= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See 'man 5 resolver' for details | |
nameserver 127.0.0.1 | |
nameserver ::1 | |
port 5253 | |
domain #{hostname} | |
search_order 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment