How to obtain Public IP address of a Server to assist in Provisioning and or Trouble Shooting

How to obtain Public IP address of a Server to assist in Provisioning and or Trouble Shooting

125
Created On 11/10/26 10:57 AM - Last Modified 11/10/26 15:55 PM


Objective


During the course of implimentation or troubleshooting, there may be a need to Identify the Public IP address of a connector server.  Typical resource via a web browser is is whatismyip.com

However you can use ifconfig.me to obtain that same IP information via command line via an Administrative  PowerShell Prompt. ifconfig.me is a webservice that displays information about your connection, including your IP address, hostname , and User Agent string. 


Environment


12.6;12.7;13.0;13.2;13.1 Privilege Cloud Server;PSM;Deployment;Connector;Secure Tunnel;Secure Tunnel Client

Procedure


To curl ifconfig.me from an administrative PowerShell prompt, you can use the following steps :

 You can use the following steps to obtain the Public IP of host that you are on :

1.) Open an administrative PowerShell prompt.
2)  Type the following command :
      curl ifconfig.me
3) Press Enter

This will curl the ifconfig.me website and return your IP address

Should the curl command be rejected, you can also try from a command prompt.  In the same administrative powershelll window :

1) Type the following command : cmd 
2)  Type the following command :
      curl ifconfig.me
3) Press Enter

Here is the website you may also enter into a web browser to achieve the same if  the browser is not 
prohibited.

https://ifconfig.me/

image.png

Here is some additional commands that you may use to achieve more than just the IP address
 

Command Line Interface

$ curl ifconfig.me⇒66.37.42.11
$ curl ifconfig.me/ip⇒66.37.42.11
$ curl ifconfig.me/ua⇒Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
$ curl ifconfig.me/lang⇒en-US,en;q=0.9
$ curl ifconfig.me/encoding⇒gzip, deflate, br
$ curl ifconfig.me/mime⇒text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
$ curl ifconfig.me/charset⇒ 
$ curl ifconfig.me/forwarded⇒66.37.42.11, 34.160.111.145,35.191.26.154
$ curl ifconfig.me/all⇒ip_addr: 66.37.42.11
remote_host: unavailable
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
port: 44092
language: en-US,en;q=0.9
referer: https://www.google.com/
connection:
keep_alive:
method: GET
encoding: gzip, deflate, br
mime: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
charset:
via: 1.1 google
forwarded: 66.37.42.11, 34.160.111.145,35.191.26.154
$ curl ifconfig.me/all.json⇒{"ip_addr":"66.37.42.11","remote_host":"unavailable","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36","port":44092,"language":"en-US,en;q=0.9","referer":"https://www.google.com/","method":"GET","encoding":"gzip, deflate, br","mime":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","via":"1.1 google","forwarded":"66.37.42.11, 34.160.111.145,35.191.26.154"}


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000wKACAY&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail