Ask Your Question

firewalld blocks dns requests on VM

asked 2014-10-18 09:26:51 +0000

ib54003 gravatar image

updated 2015-03-28 15:29:14 +0000


i've set up a new VM on my Host. On the Host i added a Bridge for the VM. For some reason firewalld (running on the Host) blocks all dns requests from the VM.

(firewalld on):

ping works

ping google.com doesn't work

(firewalld off)

ping works

ping google.com works

How can i set a rule to allow dns requests? I already set net.ipv4.ip_forward=1 in /etc/sysctl.conf .

edit retag flag offensive close merge delete


When you say "ping google.com doesn't work," do you mean that you are unable to resolve the google.com domain name to an IP address, or is there some other reason the ping is failing? Also, I presume you set net/ipv4.ip_forward to 1 on the host and not the VM, right?

bitwiseoperator ( 2014-10-19 23:15:34 +0000 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-19 19:52:04 +0000

rsc gravatar image

I am not a firewalld expert, however you first need to figure out which zone(s) you are using. This can be done using "firewall-cmd --get-active-zones". Afterwards something like "firewall-cmd --permanent --zone=default --add-service=dns" followed by "firewall-cmd --reload" might be suitable for your situation (please do not just copy and paste but really lookup what these commands are doing and if they are suitable). However it heavily depends on the zones you have, want and need. If unsure, come back with the output of "firewall-cmd --get-active-zones", please.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.


Asked: 2014-10-18 09:26:51 +0000

Seen: 787 times

Last updated: Oct 19 '14