You can, but usually either one of them has your default route. To get your external IP (as others see it) you can try to parse the output of http://www.whatismyip.org this output is plaintext, IPv4 only. Not sure how it handles proxies e.g. X_FORWARDED_FOR header.