Tuesday, April 08, 2008

Find Out Your Web Server's Public IP(Linux)

Sometimes, your server might be behind those nifty grifty firewall and it only has local address. If you want to find out your server's public IP, use this command to find out:

curl -s www.whatismyip.com/automation/n09230945.asp|sed

Basically I used www.whatismyip.com service and used curl to get the content of the page.