Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2482  / 1 Year ago, wed, may 31, 2023, 5:42:42

I have a domain test.dev bound to 127.0.0.1 in /etc/hosts. How can I bind all the subdomains, e.g. any.th.ing.test.dev to 127.0.0.1 as well?


More From » 11.10

 Answers
5

This is actually dead-simple with dnsmasq:



# install dnsmasq
sudo apt-get install dnsmasq
# map anything ending in .dev to 127.0.0.1
echo address=/dev/127.0.0.1 | sudo tee /etc/dnsmasq.d/dev
# restart to make it read new config
sudo service dnsmasq restart
# verify it's working
host gsdf.gsd.fg.sdf.g.dev
# gsdf.gsd.fg.sdf.g.dev has address 127.0.0.1

[#41011] Thursday, June 1, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
measord

Total Points: 259
Total Questions: 131
Total Answers: 106

Location: Venezuela
Member since Sun, Oct 2, 2022
2 Years ago
measord questions
Wed, Jul 14, 21, 21:39, 3 Years ago
Mon, May 16, 22, 21:12, 2 Years ago
Mon, Oct 11, 21, 03:11, 3 Years ago
Sun, Apr 17, 22, 21:22, 2 Years ago
;