Getting External IP Address from Ubee brand Cox Cable Modem

I’m sure there are others in this world that have Cox cable internet with an Ubee brand cable modem/Wireless access point. I’m sure within that crowd of people, a few are looking to find a way to get the external IP allocated to your connection. (the IP of the cable modem from the outside world)
I run Unix (Linux & Unix actually), and this is what I use from the command line:

wget http://192.168.0.1/RgSetup.asp –http-user=user –http-password=MYPASSWORD -qO- | grep -o ‘[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}’ | head -1

Replace MYPASSWORD with the password you use to login to the web interface of the Ubee cable modem. Also, be sure to escape the special characters in your password with a backslash ( \ ) when you use it in the commandline, or else they won’t work.
This will simply spit out the IP address allocated at that time.

Hope this helps someone!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s