ip_address: make external IP address source configurable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
byobu |
New
|
Undecided
|
Unassigned |
Bug Description
The following URLs used to report the external IP address are currently inaccessible with my K-Net ISP:
- http://
- http://
When I try to access them from my main ISP, I get a timeout:
```
# wget -4 -O- --timeout=5 --tries=1 --progress=dot http://
--2020-03-28 11:36:32-- http://
Resolving v4.ipv6-test.com (v4.ipv6-
Connecting to v4.ipv6-test.com (v4.ipv6-
Giving up.
```
Somehow, either there's a routing issue or my IP address is blocked.
When using my backup Free ISP or a VM on Google Cloud, no problem:
```
# wget -4 -O- --timeout=5 --tries=1 --progress=dot http://
--2020-03-28 11:35:48-- http://
Resolving v4.ipv6-test.com (v4.ipv6-
Connecting to v4.ipv6-test.com (v4.ipv6-
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘STDOUT’
82.64.xxx.xxx
0K 749K=0s
2020-03-28 11:35:48 (749 KB/s) - written to stdout [13]
```
Would it be possible to make them configurable?
For the time being, I've switched to another source with this change:
```
# diff /usr/lib/
44c44
< timeout 1 wget -q -O- http://
---
> timeout 1 wget -6 -q -O- http://
63c63
< timeout 1 wget -q -O- http://
---
> timeout 1 wget -4 -q -O- http://
68c68
< timeout 0.2 wget -q -O- http://
---
> timeout 0.2 wget -4 -q -O- http://
```
Note: that I've added -4 or -6 to the wget commands to make sure the proper protocol version is selected as the hostname is the same for both cases here.