You can do this by using the server= directive e.g.
would query the google public DNS server for the ajax.googleapis.com domain, similarly
would query Level3's public DNS server for the amazonaws.com domain.
You can group multiple domains together
In BIND 9, you can define multiple "views": in effect, BIND shows one version of a DNS zone to specified clients and another version to others. This seems to be exactly what you'll need.
Here is a nice introduction to using views in BIND 9:
In your case, though, the ...
For those who like me are confusing on why port 53 is still open for all interfaces regardless which option you put in to limit it. There is one more option that need to be turned on.
On systems which support it, dnsmasq binds the wildcard address, even when it is listening on only some interfaces. It then discards requests ...
This is also possible from the dnsmasq configuration file, and is documented in Simon Kelley's example file at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example:
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more ...
Setup reservations for the specific hosts using the dhcp-host option. Use tag options to flag those for a special set of options.
This is completely un-tested, but I suspect your config might look something like this. Check the man page for full details.
From the dnsmasq example config
# An example of dhcp-boot with an external TFTP server: the name and IP
# address of the server are given after the filename.
# Can fail with old PXE ROMS. Overridden by --pxe-service.
# If there are multiple external tftp servers having a same name
# (using /etc/hosts) ...
Well in your example you're only pointing out facebook, but I guess you would have the same need for every hostname you might visit
dnsmasq provides the option --all-servers
By default, when dnsmasq has more than one upstream server available, it will send queries to just one server. Setting
this flag forces dnsmasq to send all ...
The dnsmasq man page says:
Add A, AAAA and PTR records to the DNS. This adds one or more names to the
DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may
appear in more than one host-record and therefore be ...
dig (domain information groper) and nslookup (query Internet name servers interactively) are tools that query name servers. Unless a specific name server is specified as a commandline argument they will query the name server(s) found in /etc/resolv.conf. They simply don't look at alternative sources of host information such as the /etc/hosts file or other ...
I had to add "bind-interfaces" to the config file, so that interface and listen-address had the desired effect. E.g.:
This will have the desired effect of listening only on localhost. I was running into issues, since I was running a public dns (that resolves just my own domains) on the public ip of the ...
ping use glibc's name resolution system, called Name Service Switch. This uses the /etc/nsswitch.conf file to know where to look for in order to resolve a name to an IP. The hosts: line in this file represents an order of preference for each service. For exemple, files represent the local /etc/hosts file, dns uses the /etc/resolv.conf file to contact a DNS ...
See this https://stackoverflow.com/questions/38021/how-do-i-find-the-authoritative-name-server-for-a-domain-name
in short, nslookup
set the query type to SOA
nslookup -querytype=soa google.de
nslookup -d2 -type=ANY google.de
nslookup -d2 -type=ANY google.de 126.96.36.199
look for: primary name server
command line> nslookup
> set ...
Sure just add multiple lines.
-S, --server=[/[<domain>]/[domain/]] ...
... More than one -S flag is allowed, with
repeated domain or ipaddr parts as required.
It stands to reason that the syntax in the question would make sense. However, it is even simpler than that:
[Edit] After a couple years of this in use, I'm reporting a problem with this setup. Say you have a public and a secure network, both accessible via WiFi. If your device connects to the ...
There are two ways to cause dnsmasq to reload a hosts file:
As Aaron Copley noted in his comment, send SIGHUP to dnsmasq. From the man page:
When it receives a SIGHUP, dnsmasq clears its cache and then re-loads /etc/hosts and /etc/ethers and any file given by --dhcp-hostsfile, --dhcp-hostsdir, --dhcp-optsfile, --dhcp-optsdir, --addn-hosts or --hostsdir. ...
None. It's important that the nominated default gateway should be a machine on the local network which will gateway your traffic to and from the wider internet, and it's important that the nominated DNS server should be a machine which will answer your DNS queries correctly and promptly. Often these functions are consolidated into a single device, but ...
dnsmasq can resolve its own hostname by disabling reading from /etc/hosts and configuring another config file for reading the hostnames including itself.
dnsmasq configuration (/etc/dnsmaq.conf):
In /etc/dnsmasq_hosts, configure own hostname point to ip address one needs (as well other hostnames in local lan).
The issue is that you have configured dnsmasq to provide TFTP service (via the enable-tftp option in dnsmasq.conf). The service port for TFTP is UDP/69, so dnsmasq wants to bind to it, but xinetd has already done so, and it is impossible for two different processes to bind to the same service port.
If you want dnsmasq to provide TFTP service, you will need ...
The reason you're not finding the option is that OS resolver libraries cannot use ports other than 53. While it's possible to have a nameserver forwarder use ports other than 53, it is unlikely that the authors of this software support and/or anticipate your particular use case. You would need ask them why this feature is absent.
You could try something ...
That's due to CloudFlare(CDN provider of IETF) choosing ECDSAP256SHA256 as their signature algorithm. Dnsmasq has implemented ECDSA since 2.69, however it was broken and not fixed until 2.73 which was released in March 2015. Thus, you'll need a newer dnsmasq or patched version to resolve it correctly.
From the dnsmasq change log in the 2.73 section:
I want to know what exact server in the end had the answer. Is that possible?
This is not achievable. You will not find the specific authoritative server that was consulted named anywhere in the payload of a DNS reply. There are CHAOS queries that exist for the purpose of identifying the specific recursive server that replied to you, but no such equivalent ...