Finding your external IP address (without using a bounce site)

Problem:

You need to find your external (Internet) IP address, but you don't want to have to contact a remote site to send your IP back to you. You can't use the ever-popular Windows-based IP checkers, because they just report your internal (LAN) IP address.

Solution:

Create a simple shell script that retrieves the information.

Login to your Freesco box as root (via telnet).

If you're using Freesco v0.2.7, type:

cd /mnt/router/fix
edit getip
If you're using Freesco v0.3.0, type:

cd /boot/bin
edit getip
Now, type the following:

#!/bin/sh
cat /etc/live.cfg | grep IPADDR | sed 's/.*=//'
Press Alt+X to exit, and press Y to save when prompted.

Next, you need to make the script executable. Type:

chmod 755 getip
cp getip /bin
Now, to test it out, just type:

/bin/getip
And your IP should be displayed. In future, any time you need to check your IP, just login and type /bin/getip.

You might also want to check out our CGI shell script article - then you can look up your IP from the comfort of your web browser (rather than telnetting into your router).