server1 and server2 are guest VMs in a KVM host machine:

server1.example.com[] : Configured as DNS server enter image description here

tcpdump output while query is running from server2 enter image description here

server2.example.com[] : Client querying server1

[user@server2 ~]$  nslookup server2.example.com
;; connection timed out; no servers could be reached

[user@server2 ~]$  ping -c 1 
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.385 ms

--- ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.385/0.385/0.385/0.000 ms
[user@server2 ~]$ 
[user@server2 ~]$ nmcli con show eth0 | grep ipv4.dns
ipv4.dns:                     ,
ipv4.dns-search:                        example.com
[user@server2 ~]$ 

Edit : Ok , now i seem to have fixed the problem but still unable to understand what is the problem. running wireshark shows error : "Code 10 = Communication with Destination Host is Administratively Prohibited)."

Online search showed that its related to firewall and needed to run service iptables stop;iptables --flush

Thats it, nslookup is working now.but still unable to get my head around the problem since firewall-cmd has replaced iptables and i don't understand what is really going on.

  • I would write a better answer, taking out the edit from the question. Beware of open resolvers if the DNS machine faces the Internet or has PAT/NAT Jun 11, 2018 at 6:58
  • Put all relevant data as text in your question, instead as images. Jun 15, 2018 at 23:37

1 Answer 1


The answer came out to be very simple.

[user@server1 ~]$ sudo firewall-cmd --permanent --add-port=53/tcp
[user@server1 ~]$ sudo firewall-cmd --permanent --add-port=53/udp
[user@server1 ~]$ sudo firewall-cmd --reload
[user@server1 ~]$ 

but i really wanted to see any permission denied or any logs for theses errors

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .