Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have following scenario: I have set up an ad-hoc network with wicd on my server, and use dnsmasq as an dhcp- and dns-server. The network works very well, I can connect, get an ip address, and on all clients the nameserver is set to the IP of my server. But I want that all dns request of the clients are resolved to my local server which runs an apache webserver. Is this possible with dnsmasq?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Yes!

I use it this way:

/usr/local/sbin/dnsmasq -z -k -2 -i vlan9 -a 10.6.66.1 \
--address=/\#/10.6.66.1

10.6.66.1 is the IP address it returns.

UPDATE Yes, # is a wildcard. You can specify multiple with --address

share|improve this answer
    
one question: the \# in the address part is the wildcard for all domainrequest, or? –  Moe Mar 24 '11 at 14:56
    
thanks got it to work, but it should only be # instead of \# –  Moe Mar 24 '11 at 15:42
    
It depends on your shell. It is an escape mechanism as the shell would interpret it as a comment. –  cstamas Mar 24 '11 at 16:36
    
ah ok you're right :D i use it in the dnsmasq.conf, therefore i haven't to escape it ;) –  Moe Mar 24 '11 at 18:46

The primary options to use in the conf file for this would be:

address=/#/10.6.66.1
interface=vlan9
share|improve this answer

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.