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-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!

Leave a Reply

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

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.