Help Center/ Elastic Cloud Server/ FAQs/ EIP/ How Do I Query the Egress Public IP Address of My ECS?
Updated on 2026-02-28 GMT+08:00

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

Scenarios

Cloud servers usually access the Internet over EIPs.

You can log in to the management console to view the EIP bound to an ECS from the ECS list. For details, see Viewing ECS Details.

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 the 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