EIP Direct Access

Last Updated At: 2025-11-26 15:01:30

Scenarios

When users access the public network through EIP, they can choose NAT mode or EIP direct access mode. The current default mode is NAT mode.

  • EIP is not visible locally in NAT mode.
  • After EIP direct access, the EIP is visible locally. There is no need to manually add the EIP address each time when configuring, which can reduce the development costs.
    Note:

    EIP direct connection is currently allowlist-controlled and only supports devices within the VPC.

Operation Steps

Step 1: Download the EIP Configuration Script

Since the EIP direct access process will cause network interruption, you need to download the EIP direct access script and upload it to CVM. Proceed as follows:

  1. Download the EIP direct access Configure script. This step is optional. > Note:
    The Linux script supports CentOS 6.x, CentOS 7, and Ubuntu.

  2. After downloading the script locally, upload it to the Cloud Virtual Machine
    that requires EIP direct access.

Step 2: Run the EIP Direct Access Script

  1. Log in to the CVM server that requires EIP direct access.

  2. Run the EIP direct access script. Specific method:

    • Under Linux operating system CentOS:
    eip_linux.sh install XX.XX.XX.XX 
    

Among them, XX.XX.XX.XX is the EIP address, which is optional.

  • Under Windows operating system:
eip_windows.bat XX.XX.XX.XX

Among them, XX.XX.XX.XX is the EIP address.

Step 3: Enable EIP Direct Access

  1. Log in to the CVM console.
  2. In the left sidebar, click EIP.
  3. In the selection list, click EIP Direct Connect to enable.
    Note:

  • The script only supports eth0 and does not support auxiliary network interfaces yet.
  • The NAT gateway can be bound to an EIP that enables direct access mode, but there is no direct access effect.