I need to find out my wan IP address from Linux command prompt. My modem changes IP address every day. Is it possible to use Linux command to get wan IP address?
Try the following commands to get your public IP address assigned by your ISP to your router:
dig +short myip.opendns.com @resolver1.opendns.com
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
host myip.opendns.com resolver1.opendns.com