Blueman NAP feeds bad DNS to clients on Ubuntu with dhcpd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
blueman (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm on Ubuntu 19.04
blueman-
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/
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.
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/'