[Dnsmasq-discuss] DNS to respond to all requests

Simon Kelley simon@thekelleys.org.uk
Sat, 11 Dec 2004 19:44:02 +0000


Peter Willis wrote:
> Simon Kelley wrote:
> 
>> If you add
>>
>> address=/#/1.2.3.4
>>
>> to /etc/dnsmasq.conf then dnsmasq will always return 1.2.3.4 to any A
>> record DNS query which cannot be answered from the hosts file or DHCP
>> leases. That's not exactly what you asked for, (it's not "any dns 
>> request" and the answer isn't random) but it might be enough for the 
>> testing you want to do.
> 
> 
> I'm curious, why do you use a pound symbol instead of an asterisk (*) ?
> 

All the options which are valid in /etc/dnsmasq.conf are also valid as 
long options on the command line, so it's possible to run

dnsmasq --address=/#/1.2.3.4

from a root shell. Just to make that sort of thing simpler, I have a 
policy of not using shell metacharacters in the configuration strings.

Cheers,

Simon.