A quick and easy script to check your external IP address on Linux. Useful for those times when your Dynamic DNS is playing up and you want to check it has synced the most recent IP.
Create the script in a location of your choice
[user@machine ~]$ vi externalip.sh
Enter the following content. The #!/bin/bash tells the computer to use the bash shell to execute the script, and the line below will use the website ipecho.net to report the external ip to the terminal.
#!/bin/bash curl ipecho.net/plain; echo
Thats it! Save the script and give it executable permissions, then run it to return your IP address.
[user@machine ~]$ ./externalip.sh 184.108.40.206