Wildcard in /etc/hosts file
14,330
You'd really need to run your own DNS server and use wildcards. Exactly how you'd do that would depend on the DNS package you ran.
Related videos on Youtube
Author by
Peter Smit
Currently working as Doctoral Student in the Speech Group of the Department of Signal Processing and Acoustics of the Aalto Univerity School of Electrical Engineering (formerly TKK / Helsinki University of Technology) in Helsinki, Finland.
Updated on September 17, 2022Comments
-
Peter Smit almost 2 years
It seems that wildcards are not supported in the /etc/hosts file.
What is the best solution for me to resolve all *.local domains to localhost?
-
Admin over 13 yearsWhat distro are you using?
-
Admin over 13 years@Mark Ubuntu 10.10
-
-
ephemient over 13 yearsIndeed. This is rather trivial with dnsmasq; a configuration with address=/local/127.0.0.1 does what OP requests.