Linux Red Hat: get the WAN IP from the command line?

TJN23

Golden Member
May 4, 2002
1,670
0
0
Hi,

I'm looking for a way to make the system return my WAN IP in a shell. I know you can visit a site like mywanip.com, but I am working on a shell script that can somehow get it from a command line.

Thanks in advance...