Enabling UFW makes my VMs unable to resolve DNS


New Member
Oct 3, 2023
Reaction score
Hi all,
I have an Ubuntu 22.04 server, running few VMs in kvm. I noticed that when I turn my firewall on (on my server) I can't update any of the machines. I checked everything I could think of, on the host and on the guests, it took me days before I turned the firewall off to see what would happen. All of a sudden I was able to ping a domain, and able to update the VM. I enabled the firewall, and DNS was blocked yet again.
What do I need to do to have both, the UFW enabled on the host, and to be able to resolve on the hosts. I already tried allowing port 53 on the server, didn't work.
Any help appreciated. Thanks

Just to add, with the UFW enabled I am able to ping an IP, but unable to ping any domain.
It looks like this is a couple of weeks old. Did you allow both TCP and UDP on port 53?
Thanks for your reply. Yes, both were opened. I turned the firewall off for now, otherwise my VMs can't update.
If you enable the firewall, what is the output of...

sudo ufw status

Latest posts