Take the 2-minute tour ×

I have a OS X Server behind an airport extreme, serving services via opened ports on the airport.

The server has a 10.0.x.x local address, always the same one. The airport extreme gets it's external IP address via PPPoE, and sometimes... once a week it changes.

For security reasons WE ACTUALLY like this behavior. But i need a way to know the external IP address just in case i need to connect and do something to the server while on the outside.

What can i do?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

The site I use for exactly this behaviour is ifconfig.me. This can return data in any format you might want to use. E.g. In a bash script where you just want the ip:

IP=curl http://ifconfig.me/ip Of course, you'll want to check the return code in case something goes wrong. It does seem quite robust for scripting, though.

by Morphit


share|improve this answer
add comment

I'm dubious about how much security you get this way, but if you can live with the changing IP address, might as well stick with your current setup.

You can obtain your router's IP address by visiting a site such as http://whatismyipaddress.com/ from a system behind the router. That doesn't do you any good if you're not currently behind the router, of course. So write a script that runs every little while and scrapes the IP address off such a site. You might want to provide your own site for that purpose, to avoid abusing somebody else's.

The script should compare the latest IP address against the last recorded IP address. If it's changed, the script email the new address to somebody who needs to know.

share|improve this answer
add comment

Your Answer


