Skip to content

Instantly share code, notes, and snippets.

@LEXASOFT
Created March 20, 2019 16:33
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 LEXASOFT/d690c4b5d836794d26c309c50bb39084 to your computer and use it in GitHub Desktop.
Save LEXASOFT/d690c4b5d836794d26c309c50bb39084 to your computer and use it in GitHub Desktop.
Route complete TLD (*.test for example) to 127.0.0.1
#!/usr/bin/env bash
sudo apt-get install dnsmasq
sudo mkdir /etc/NetworkManager/dnsmasq.d
sudo echo "address=/test/127.0.0.1" > /etc/NetworkManager/dnsmasq.d/dnsmasq-localhost.conf
sudo service network-manager restart
sudo service dnsmasq restart
nslookup foobar.test 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment