Finding the public IP address of your Linux server

Often there are times you might want to find the public ip of your Linux server (e.g. if EDI is having issues and you want to confirm your public ip for your VAN for example, or if you are using relay and need to allow one public host to relay your email off).

From the Linux command line, type:

curl icanhazip.com

Your public IP will then be displayed, as in the example below:

[root@eclipse ~]# curl icanhazip.com
158.67.246.214