Script 'wifi-status' assumes 8.8.8.8 is available and accessible
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/
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-