What's new

How do i get dnsmasq to steer queries to different upstream name servers?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tomsk

Very Senior Member
I have worked out how to split traffic between the wan and VPN... now i want to get dnsmasq to use the VPN provider DNS for the VPN traffic, but use the DNScrypt client for wan traffic. Can anyone give me a nudge in the right direction?
Thanks
 
Thanks Martineau ... but i am using a PPTP VPN tunnel so i can't take advantage of the excellent built in client....... so I'm forced to script it..... but not so bad as it forces me to learn too :)
 
Thanks Martineau ... but i am using a PPTP VPN tunnel so i can't take advantage of the excellent built in client....... so I'm forced to script it..... but not so bad as it forces me to learn too :)

:rolleyes:
 
I wanted to use dnsmasq for either so it would work with AB-solution....i thought the DNS filter only used dnsmasq for the "router" option
 
Is what i want to do actually possible with a single instance of dnsmasq? ....i dont know if trying to steer its output, or trying to change the config file on the fly might work better. I was reading a bit about openresolv which seems like it something that might work..... maybe dnsmasq ipset options?
 
Last edited:
From the man himself, Simon Kelley in his FAQ:

Q: My company's nameserver knows about some names which aren't in the
public DNS. Even though I put it first in /etc/resolv.conf, it
dosen't work: dnsmasq seems not to use the nameservers in the order
given. What am I doing wrong?

A: By default, dnsmasq treats all the nameservers it knows about as
equal: it picks the one to use using an algorithm designed to avoid
nameservers which aren't responding. To make dnsmasq use the
servers in order, give it the -o flag. If you want some queries
sent to a special server, think about using the -S flag to give the
IP address of that server, and telling dnsmasq exactly which
domains to use the server for.

Q: OK, I've got queries to a private nameserver working, now how about
reverse queries for a range of IP addresses?

A: Use the standard DNS convention of <reversed address>.in-addr.arpa.
For instance to send reverse queries on the range 192.168.0.0 to
192.168.0.255 to a nameserver at 10.0.0.1 do
server=/0.168.192.in-addr.arpa/10.0.0.1
Note that the "bogus-priv" option take priority over this option,
so the above will not work when the bogus-priv option is set.

You might be able to tweak it such a way. His manpage covers every detail of Dnsmasq.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top