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.

I'm running Ubunut 12.04

I want *localhost.dev to point to 127.0.0.1.

Ubuntu 12.04 comes with dnsmasq-base installed with network-manager. But there is no /etc/dnsmasq.conf.

  1. So I installed the dnsmasq package
  2. The /etc/dnsmasq.conf file appeared
  3. I added: address=/localhost.dev/127.0.0.1
  4. sudo restart network-manager

Doesn't work. How do I solve this?

EDIT: Turns out it works after a restart.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

After configuring settings , we have to restart dnsmasq service :

sudo /etc/init.d/dnsmasq restart

Update :

If you want to use wild card (*) then you can use dot (.) then dnsmasq to resolve WHATEWER_YOU_PUT_HERE.yourmachine.yourdomain to the same ip.

Example :

 address=/.localhost.dev/127.0.0.1
share|improve this answer
    
No. The dot wasn't necessary. It works without it. A full restart made it work. –  Andreyy Mar 25 '13 at 12:07
    
@Andreyy Rahul's answer still correct, you need to restart dnsmasq instead of network-manager. Full restart/reboot is not necessary –  number5 Aug 6 '13 at 23:59
    
The answer about the restart might be correct while the "dot" change is not necessary. @Rahul change the answer and I'll accept it. –  Andreyy Aug 8 '13 at 9:10
    
@Andreyy as you mentioned *localhost.dev in your question, to apply on all subdomain we should use dot like .localhost.dev –  Rahul Patil Aug 8 '13 at 13:30

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.