Skip to content

Instantly share code, notes, and snippets.

@spektom
Last active October 31, 2018 07:08
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 spektom/9b28eed8b90ba82e92886ebdd1912499 to your computer and use it in GitHub Desktop.
Save spektom/9b28eed8b90ba82e92886ebdd1912499 to your computer and use it in GitHub Desktop.
AWS private IP DNS resolver on Mac
# Add the following lines to /usr/local/etc/dnsmasq.conf:
address=/ec2.internal/127.0.0.1
synth-domain=ec2.internal,0.0.0.0,255.255.255.255,ip-
address=/us-west-2.compute.internal/127.0.0.1
synth-domain=us-west-2.compute.internal,0.0.0.0,255.255.255.255,ip-
address=/eu-west-1.compute.internal/127.0.0.1
synth-domain=eu-west-1.compute.internal,0.0.0.0,255.255.255.255,ip-
# Create file /etc/resolver/ec2.internal:
nameserver 127.0.0.1
# Create file /etc/resolver/eu-west-1.compute.internal:
nameserver 127.0.0.1
brew install dnsmasq
sudo brew services start dnsmasq
# Create file /etc/resolver/us-west-2.compute.internal:
nameserver 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment