If you want to use UFW Firewall with DNSMASQ you need to enable some extra ports so all the queries can process correctly. Here are the ports you should open.
[raw]ufw allow from any port 68 to any port 67 proto udp
[/raw] [raw]ufw allow dns
[/raw] [raw] ufw disableufw enable
[/raw]