Script 'wifi-status' assumes 8.8.8.8 is available and accessible

Bug #1846983 reported by Brian Pond
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
New
Undecided
Unassigned

Bug Description

I'm reporting this from a server with Ubuntu 18.04.3 LTS. As part of byobu, there is a shell script located here: /usr/bin/wifi_status

The script makes reference to Google's DNS server 8.8.8.8 in two locations.

I fully understand that Google DNS is widely used in 2019. And that their DNS uptime is consistently 99.99%. With that said, I am questioning whether we should be hard-coding IP addresses in Ubuntu software.

1) The continued existence of Google's 8.8.8.8 is extremely likely. But there are no guarantees.

2) Some users (myself being one) operate a whitelist-only firewall policy. IP addresses needed are whitelisted. Everything else is blocked. This includes DNS servers we don't use, like 8.8.8.8. And because that IP is blocked, the 'wifi_status' script might return false negatives.

3) Hard-coding IP addresses is fundamentally not a best practice.

Suggestions:
Modify the script to ping the IP of whatever primary/secondary DNS server is configured on the machine. Perhaps the nameserver inside /etc/resolv.conf

Alternately, create a plaintext file somewhere on the server. Name this file "known-good-ping-address". Default installation value of 8.8.8.8. But make it a permanent part of Ubuntu. Not only can wifi-status script fetch this value, but so can other utilities (systemd, Docker/Kubernetes, NetworkManager, etc). Whenever any application needs to ping "somewhere", this file will contain a known-good IP address. The Ubuntu user can modify this 1 file, and all other applications will use the new value.

Tags: bionic byobu dns
Revision history for this message
Brian Pond (bpond) wrote :
description: updated
description: updated
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.