[Dnsmasq-discuss] --server order / default if fail
Salatiel Filho
salatiel.filho at gmail.com
Thu Feb 3 15:40:17 UTC 2022
Hi, I am trying to set dnsmasq on my desktop to forward only dns
requests to my company's domain to their DNS server while left all the
remaining on google's DNS.
Reading dnsmasq manual I can see:
-S, --local, --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<interface>][@<source-ip>[#<port>]]
Specify IP address of upstream servers directly.
Setting this flag does not suppress reading of /etc/resolv.conf, use
--no-resolv to do that. If one or more optional domains are given,
that server is used only for
those domains and they are queried only using the
specified server. ... More than one --server flag is allowed, with
repeated domain or ipaddr parts as required.
Question 1) If I have more than one entry, will those queries be in
parallel or serialized ?
Question 2) Is there a way to configure as: for the domain xpto.biz (
redacted ), use the server 192.168.1.1 at interface Y. If interface is
not available, go to the default server. I ask this because my company
have split DNS, so If I am connected to the VPN ( interface tun0 ) I
would like to use private IPs, otherwise I would like to use public
IPs. ( if they are available publicly)
I tried the following:
server=/xpto.biz/192.168.1.1 at tun0
server=/xpto.biz/#
but it did not work. If I am connected to the tun0 it works, but if
not, it fails with:
Feb 3 12:31:40 aorus dnsmasq[5804]: failed to bind server socket to
tun0: No such device
Feb 3 12:31:40 aorus dnsmasq[5804]: failed to bind server socket to
tun0: No such device
Feb 3 12:31:40 aorus dnsmasq[5804]: config error is REFUSED
and it does not try the "default".
Using Dnsmasq version 2.80
Thanks!
Atenciosamente/Kind regards,
Salatiel
More information about the Dnsmasq-discuss
mailing list