View the public network IP address under the Linux server

share a drink no 2022-11-24 22:02:13 阅读数:277

viewpublicnetworkipaddress

When the interface is connected, many companies need the other party to provide the public IP address to configure the corresponding IP whitelist.So how to check the public network IP of the corresponding server in the Linux environment, the specific operation is as follows: You can execute the following command:

curl ifconfig.me 

Enter the above command in the linux system to view the public network information connected to the machine; if the command is invalid, you can use the following command to obtain more detailed IP information.

curl cip.cc

You can also use the following command:

curl http://members.3322.org/dyndns/getipcurl icanhazip.com

The principle is similar.

Extended You can find the ip address under Windows in the following ways: Enter Baidu, search for IP, and you can see your public IP.

copyright:author[share a drink no],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/328/202211242155084108.html