Skip to content

Instantly share code, notes, and snippets.

@westberliner
Created March 8, 2020 12:11
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 westberliner/73f1346521a3a554d1579bb8cbc13fb6 to your computer and use it in GitHub Desktop.
Save westberliner/73f1346521a3a554d1579bb8cbc13fb6 to your computer and use it in GitHub Desktop.
Ubuntu 19 local tld domain via dnsmasq

#https://askubuntu.com/questions/233195/route-complete-tld-dev-for-example-to-127-0-0-1#233224

Disable systemd-resolved

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service
sudo rm /etc/resolv.conf
Edit /etc/NetworkManager/NetworkManager.conf to use dnsmasq for DNS.
[main]
dns=dnsmasq

Put dnsmasq configuration in /etc/NetworkManager/dnsmasq.d/test-tld.conf

address=/test/127.0.0.1
address=/customerX.test/192.168.33.10

and finally restart NetworkManager which will generate a new /etc/resolv.conf

sudo systemctl restart network-manager.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment