Monday, January 9, 2012

Determining Public IP Address

Sometimes, it is just the simplest of things. An admin asked the other day what our Internet egress address was. I told him that he could use his browser to find out. However, he was dealing with a remote host, which had a different public address. A couple sites you can use to easily grab your public address from the command line are and

  [bandarji ~]$ curl ; curl
  [bandarji ~]$

These can also be used within bash quite easily.

  [bandarji ~]$ egress="`curl 2> /dev/null`" ; echo $egress
  [bandarji ~]$

1 comment:

  1. Nice information. I had checked my External ip address using this site