[SOLVED] ufw blocks dns queries from vm?

rentier

New Member
Dec 9, 2021
2
0
1
42
Hello,

I can not resolve any hostname on my debian vm as long as ufw is enabled on proxmox.

is there some configuration or some rule that I can add?

I'm running proxmox on a dedicated server, the installation was made with the hoster's iso.
it originally came with following networking:

auto lo
iface lo inet loopback

iface enp0s20 inet manual

auto vmbr0
iface vmbr0 inet static
address xx.xx.xx.xx/24
gateway xx.xx.xx.xx
bridge-ports enp0s20
bridge-stp off
bridge-fd 0

# I have then added this:

auto vmbr1
iface vmbr1 inet static
address 192.168.1.100/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.1.100/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.100/24' -o vmbr0 -j MASQUERADE

so vmbr1 is the interface for the vm of course. my vm's got the IP 192.168.1.105

as long as ufw is turned off on the host, everything works as it should..

I am quite a newbie.

Thanks alot!
 
Last edited:
I have already found a solution: I've changed "/etc/default/ufw" Forward policy from "DROP" to "ACCEPT"
 
I have already found a solution: I've changed "/etc/default/ufw" Forward policy from "DROP" to "ACCEPT"
I am currently facing the same problem,and adding an allow dns/53 rule to ufw from and to the VMs' IP range is not helping.
What you have done is the same as disabling ufw :)
 
I am currently facing the same problem,and adding an allow dns/53 rule to ufw from and to the VMs' IP range is not helping.
What you have done is the same as disabling ufw :)

I tested it, changed "/etc/default/ufw" Forward policy from "DROP" to "ACCEPT" works for me, ufw still works.
 
  • Like
Reactions: omertahaoztop