If the local host is behind firewall and/or there is NAT in between, ifconfig may not report the correct IP address which is seen externally.
The following (one line) command prints out the WAN side IP.
# curl -s http://checkip.dyndns.org | sed -e 's/.*: //;s/<.*//'
The following (one line) command prints out the WAN side IP.
# curl -s http://checkip.dyndns.org | sed -e 's/.*: //;s/<.*//'
No comments:
Post a Comment