Redirect all DNS-Requests with dnsmasq
10,299
Solution 1
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
Solution 2
The primary options to use in the conf file for this would be:
address=/#/10.6.66.1
interface=vlan9
Related videos on Youtube
![Akiva](https://lh4.googleusercontent.com/-BTGnEuQsyNs/AAAAAAAAAAI/AAAAAAAAABM/-LymZMpuzzI/photo.jpg?sz=256)
Author by
Akiva
Updated on September 17, 2022Comments
-
Akiva almost 2 years
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?
-
Akiva over 13 yearsone question: the \# in the address part is the wildcard for all domainrequest, or?
-
Akiva over 13 yearsthanks got it to work, but it should only be # instead of \#
-
user649102 over 13 yearsIt depends on your shell. It is an escape mechanism as the shell would interpret it as a comment.
-
Akiva over 13 yearsah ok you're right :D i use it in the dnsmasq.conf, therefore i haven't to escape it ;)