I am setting a DNS server in my lab, where the DNS server (Ubuntu server) and client's(Ubuntu desktop) are in same LAN (vSwitch) and pfsense as firewall for external outgoing traffic. No block rules are defined and everything is wide open on pfsense, so every VM can talk each other and also can access internet.
When I send a query to DNS server from client (172.16.0.2) using nslookup facebook.com 172.16.0.7
; I am getting the connection timeout after few seconds.
I also tried by checking the traffic using Wireshark and saw ICMP failures from DNS server to Client as shown in below image.
Just to give a try, I added rule on IPtables for ICMP iptables -A INPUT -p icmp -s 0.0.0.0/0 -d 0.0.0.0/0 -j ACCEPT
on both client and DNS server, but no use.
Is there anything that I am doing wrong or need to open any host based rules or something to make the DNS server work?
named.conf.options file:
acl "trusted" {
172.16.0.7; #localhost
172.16.0.1; #GW and FW
172.16.0.2;
172.16.0.3;
172.16.0.0/16; #complete subnet
};
options {
directory "/var/cache/bind";
dump-file "/var/cache/bind/dump.file";
recursion yes;
allow-recursion { trusted; };
listen-on { 172.168.0.7; };
allow-transfer { none; };
forwarders {
8.8.8.8;
8.8.4.4;
};
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation no;
//listen-on-v6 { any; };
};