參考網頁:https://askubuntu.com/questions/95910/c ... -public-ip
如何知道目前對外的 IP 是哪個?
不過前提是你有辦法可以連到這幾個 URL = =
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
curl ipinfo.io/ip
curl ipecho.net/plain
curl ipecho.net/plain ; echo