Show your external IP address on the command line:
`# curl -s https://ipinfo.io | jq -r .ip`
`1.2.3.4`
I use this a lot.
Show your external IP address on the command line:
`# curl -s https://ipinfo.io | jq -r .ip`
`1.2.3.4`
I use this a lot.
@tdp_org Well, that sure is a lot better than what I've currently got ddclient configured to use:
use=cmd, cmd='curl --silent --interface enp130s0 http\://checkip.dyndns.com/ | perl -ne \'chomp; if (s/.*\\b([1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*)\\b.*/$1/){print;exit}\''
@yala @jik @tdp_org @braindance
I use dig instead of curl,
to a DNS host instead of website. I've used the same command for a decade.
https://unix.stackexchange.com/a/81699
These "my IP" sites tend to be short lived, slow, compete for SEO, filled with ads, or otherwise change/break. This means you end up searching the web first for the right site instead of just running the command.