Skip to content

Instantly share code, notes, and snippets.

@gsdevme
Last active December 9, 2020 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsdevme/05ef53c2a88eb2efdcb96750fbb168be to your computer and use it in GitHub Desktop.
Save gsdevme/05ef53c2a88eb2efdcb96750fbb168be to your computer and use it in GitHub Desktop.
MacOS dnsmasq

Install dnsmasq

brew install dnsmasq
cat << EOF > /usr/local/etc/dnsmasq.conf
#log-queries

cache-size=4096

#dont use hosts nameservers
no-resolv

# Send work domains to the work DNS server in AWS
server=/jenkins.stocko-infra.net/10.0.0.2
# Send all traffic to local DNS server on my LAN (could be 8.8.8.8 etc)
server=10.10.40.53
strict-order
EOF

sudo brew services enable dnsmasq

# test it works
dig google.com @127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment