Created
February 4, 2020 14:20
-
-
Save kgaut/5a62ba1e272683ce134f6903bc70463b to your computer and use it in GitHub Desktop.
Installation et configuration de dnsmasq pour résoudre les .test et .localhost automatiquement vers 127.0.0.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################### | |
# Config dnsmasq | |
#################### | |
# SEE : https://askubuntu.com/questions/1029882/how-can-i-set-up-local-wildcard-127-0-0-1-domain-resolution-on-18-04 | |
sudo apt-get install dnsmasq | |
sudo vim /etc/NetworkManager/NetworkManager.conf | |
# Add the line dns=dnsmasq to the end of [main] section | |
sudo rm /etc/resolv.conf ; sudo ln -s /var/run/NetworkManager/resolv.conf /etc/resolv.conf | |
echo 'address=/test/127.0.0.1' | sudo tee /etc/NetworkManager/dnsmasq.d/dot.test-wildcard.conf | |
echo 'address=/localhost/127.0.0.1' | sudo tee /etc/NetworkManager/dnsmasq.d/dot.localhost-wildcard.conf | |
sudo service dnsmasq restart | |
sudo systemctl reload NetworkManager | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment