Skip to content

Instantly share code, notes, and snippets.

@odarriba
Last active November 11, 2020 01:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odarriba/395115c04b23b71933d81dd54c16b8d2 to your computer and use it in GitHub Desktop.
Save odarriba/395115c04b23b71933d81dd54c16b8d2 to your computer and use it in GitHub Desktop.
How to map all *.dev DNS entries to localhost under Ubuntu

We create an entry on dnsmasq.d directory (used to solve domains):

$ sudo mkdir /etc/NetworkManager/dnsmasq.d
$ echo 'address=/dev/127.0.0.1' | sudo tee /etc/NetworkManager/dnsmasq.d/dev-tld

And we restart NetworkManager service (you will losse internet connection for a bit):

$ sudo service network-manager restart

And, in some cases, you will also need to restart dnsmasq service:

$ sudo service dnsmasq restart
@wibimaster
Copy link

Worked with Ubuntu Mate 16.04, doesn't work anymore with Ubuntu Mate 18.04 :(

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