Display the Public IP Address of the Server
To quickly find out the public IP address of a Linux server, you can use the dig command by querying OpenDNS servers directly.
Command to run
dig +short myip.opendns.com @resolver1.opendns.com
This command returns the current public IP of the server, useful for troubleshooting network issues or confirming NAT settings.