[Dnsmasq-discuss] DNS to respond to all requests

Simon Kelley simon@thekelleys.org.uk
Fri, 10 Dec 2004 20:49:57 +0000

Harry Newman wrote:
> Hi All
> Just getting started with dnsmasq and Linux itself. So if there is a
> solution to my problem I may need a bit of explanation.
> I have a simple computer network set up that is not connected to the
> outside world at all. This is for testing purposes only. I would like
> dnsmasq to respond to any dns request with a random response. This
> should appear to be valid but random.
> Can this be done with script or setup files or do I have to go in and
> modify the code itself.
> Thanks in advance for the help,
> Harry

If you add


to /etc/dnsmasq.conf then dnsmasq will always return 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.

In case anyone is wondering, this rather strange feature was added to 
help people making public wireless access points, which want to 
intercept any web page accesses and point them to a registration page 
for new users.