Not possible from inside your lan unless you can talk to the router via telnet or something, that's the point of the router, no?
Your computer only knows about the lan around you (subnet), every other address that's not in your subnet gets routed out through the router.
You need an external service on the WAN side that you can query and it reports back your external ip