Skip to content

Instantly share code, notes, and snippets.

@vickoman
Last active August 28, 2017 15:40
Show Gist options
  • Save vickoman/43716bfb5c0e9cfd6024c2e47106394d to your computer and use it in GitHub Desktop.
Save vickoman/43716bfb5c0e9cfd6024c2e47106394d to your computer and use it in GitHub Desktop.
how to configure wildcard DNS for MACOS

Primer paso instalar dnsmasq:

brew install dnsmasq

Copiar El ARchivo de configuracion default

cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf

Editar el archivo /usr/local/etc/dnsmasq.conf

# Al final de la linea agregamos
#Wildcard for knowbly
address=/knowblyhost.local/127.0.0.1

Creamos los folders para los custom resolvers

sudo mkdir /etc/resolver
sudo touch /etc/resolver/knowblyhost.local

Luego editamos /etc/resolver/knowblyhost.local

Y le agregamos el siguiente contenido

nameserver 127.0.0.1

Corremos dnsmasq sudo brew services start dnsmasq

Y reiniciamos nuestra maquina para que se actualicen los resolvers.

Referencia. https://gist.github.com/eloypnd/5efc3b590e7c738630fdcf0c10b68072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment