Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
What distro are you using? –  Mark Davidson Oct 21 '10 at 8:22
    
@Mark Ubuntu 10.10 –  Peter Smit Oct 21 '10 at 11:12
add comment

1 Answer

up vote 10 down vote accepted

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.

share|improve this answer
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.