Posted: . At: 11:05 AM. This was 9 years ago. Post ID: 8258
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Get the internet facing IP address of a Linux machine easily.


This simple command will print out the Internet facing IP address of a Linux machine in no time.

curl ifconfig.me/ip

This will return the useragent that is used to access this URL.

ubuntu ~ $ curl ifconfig.me/ua
curl/7.35.0

Use this string to get all information about the host that is accessing the url.

curl ifconfig.me/all

Very useful in a script if the user needs information about their remote Internet facing IP in a hurry.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.