Get your Public IP via Terminal
Getting your public IP could be very helpful. Using a browser you can go to a site like www.whatismyip.com, but If you need to get it from the terminal it's a little different. Open the Terminal Application and enter the following command:
curl -s www.whatismyip.com/automation/n09230945.asp

or
curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'