Help Center/ Elastic Cloud Server/ User Guide (Kuala Lumpur Region)/ FAQs/ Network Configurations/ EIPs/ How Do I Query the Egress Public IP Address of My ECS?
Updated on 2024-06-21 GMT+08:00

How Do I Query the Egress Public IP Address of My ECS?

Scenarios

After servers are migrated to the cloud, they usually use EIPs to access the Internet.

You can log in to the management console and view the EIP bound to the ECS in the ECS list. For details, see Viewing ECS Details (List View).

If you want to query the EIP bound to the ECS without logging in to the management console, do as follows.

This section uses an ECS running CentOS 7.5 as an example.

Procedure

  1. Log in to an ECS.
  2. Run any of the following commands to query the EIP of the ECS:
    • curl icanhazip.com
    • curl ifconfig.me
    • curl ipinfo.io/ip
    • curl ipecho.net/plain
    • curl www.trackip.net/i