19

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?

h22
  • 389
  • 3
  • 16
Peter Smit
  • 1,154
  • 4
  • 18
  • 32

1 Answers1

19

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.

Cry Havok
  • 2,018
  • 14
  • 11
  • 5
    Indeed. This is rather trivial with dnsmasq; a configuration with address=/local/127.0.0.1 does what OP requests. – ephemient Oct 21 '10 at 13:25