Blueman NAP feeds bad DNS to clients on Ubuntu with dhcpd

Bug #1845824 reported by David D Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
blueman (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm on Ubuntu 19.04
blueman-2.0.5-1ubuntu2

Symptom: When configuring blueman to offer a Bluetooth Network Access Point and instructing it to use dhcpd for the DHCP server, it feeds 127.0.0.53 to the clients as the DNS server. This does not work because 127.0.0.0/8 is only accessible from localhost, and the clients route that address to themselves.

The code which generates the DHCP config is in /usr/lib/python3/dist-packages/blueman/main/NetConf.py and the offending code can be found in the get_dns_servers function at line 112

It pulls the DNS server out of /etc/resolv.conf.
On modern Ubuntu systems, Ubuntu has a DNS cache server installed, which binds to 127.0.0.53, so that's what it puts in /etc/resolv.conf. This is not the real DNS server of course, and it's not reachable from NAP clients.

Short of pulling the DNS server from NetworkManager (which seems complicated), a good compromise would be to give me a configuration option to override the DNS server so I can manually specify one to feed to the NAP clients.

Revision history for this message
David D Miller (justdave) wrote :

The following bash line appears to get the default DNS server out of NetworkManager:

systemd-resolve --status $( netstat -r | grep default | head -1 | awk '{ print $8 }' ) | grep 'DNS Server:' | sed -e 's/.*DNS Server: \(\S\+\).*/\1/'

Revision history for this message
David D Miller (justdave) wrote :

I just filed an upstream bug report for this at https://github.com/blueman-project/blueman/issues/1544

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.