I am trying to test both dnsmasq and unbound servers. I get dns query response from dnsmasq server machine "X" when i do getaddrinfo() request from machine "Y". But when i send dns query from unbound client's API from "Y" by shutting down dnsmasq and bringing up unbound server at machine "X", i don't see any dns response/resolution.
I have installed the unbound server from source and resolved its dependencies on RHEL5 on "X".
I start the unbound server at machine "X" as:
unbound -c /usr/local/etc/unbound/unbound.conf
and it starts normally without any errors.
configuration for unbound.conf is:
server:
verbosity: 1
## Specify the interface address to listen on:
interface: xxx.xxx.xxx.xxx
## To listen on all interfaces use:
# interface: 0.0.0.0
do-ip4: yes
do-ip6: yes
do-udp: yes
do-tcp: yes
do-daemonize: yes
access-control: 0.0.0.0/0 allow
## Other access control examples
#access-control: 192.168.1.0/24 action
## 'action' should be replaced by any one of:
#deny (drop message)
#refuse (sends a DNS rcode REFUSED error message back)
#allow (recursive ok)
#allow_snoop (recursive and nonrecursive ok).
## Minimum lifetime of cache entries in seconds. Default is 0.
#cache-min-ttl: 60
## Maximum lifetime of cached entries. Default is 86400 seconds (1 day).
#cache-max-ttl: 172800
## enable to not answer id.server and hostname.bind queries.
hide-identity: yes
## enable to not answer version.server and version.bind queries.
hide-version: yes
## default is to use syslog, which will log to /var/log/messages.
use-syslog: yes
## to log elsewhere, set 'use-syslog' to 'no' and set the log file location below:
#logfile: /var/log/unbound
python:
remote-control:
control-enable: no
## Stub zones are like forward zones (see below) but must only contain authority server (no recursive servers)
#stub-zone:
# name: "my.test.com"
## Note for forward zones, the destination servers must be able to handle recursion to other DNS server
## Forward all *.example.com queries to the server at 192.168.1.1
#forward-zone:
# name: "example.com"
# forward-addr: 192.168.1.1
## Forward all other queries to the Verizon DNS servers
forward-zone:
name: "."
## Level3 Verizon
forward-addr: 4.2.2.1
forward-addr: 4.2.2.4
Please tell me if I am going wrong some where, also want to know if dnsmasq server implements threads/fork child processes to handle queries and can we set the same in /etc/dnsmasq.conf?
A configuration has to be added in unbound.conf:
access-control: <IP of client machine>/8 allow_snoop