检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Binding an EIP Network address translation using NAT Gateway Suitable for scenarios where an EIP is shared by multiple ECSs The SNAT function provided by the NAT Gateway service allows the ECSs in a VPC to access the Internet without requiring an EIP.
(Recommended) Using NAT Gateway Prerequisites for this solution: You have purchased an EIP and a public NAT gateway. The public NAT gateway and the ECSs that need to access the Internet are in the same VPC.
EIPs can be bound to or unbound from ECSs, BMSs, virtual IP addresses, NAT gateways, or load balancers. Various billing modes are provided to meet different service requirements. Each EIP can be used by only one cloud resource at a time.
Solution The EIP must be associated with the private IP address using NAT, so the server must be configured accordingly. Set the public IP address of the server. Choose Edit > Settings.
After you change the VPC, you need to reconfigure network-related application software and services, such as ELB, VPN, NAT, and DNS.
After the VPC is changed, you are required to reconfigure network-related application software and services, such as ELB, VPN, NAT, and DNS. During the change process, do not perform operations on the ECS, including its EIP.
As a result, the instance may fail to be remotely logged in. guestos.network.wrong_nat_config Checking the Kernel Parameters of the NAT Gateway Environment The kernel parameters related to NAT gateway access are incorrectly configured for the current instance.
Run the following command to complete the modification: sysctl -p /etc/sysctl.conf Run the following commands to add rules to the nat table in iptables so that the access to port 1080 on ECS 1 can be redirected to port 22 on ECS 2: iptables -t nat -A PREROUTING -d 192.168.72.10 -p
EIPs can be bound to or unbound from ECSs, BMSs, virtual IP addresses, NAT gateways, or load balancers. Various billing modes are provided to meet different service requirements. Each EIP can be used by only one cloud resource at a time.
For more information about NAT Gateway, see NAT Gateway Service Overview. Parent topic: EIP
After the VPC is changed, you are required to reconfigure network-related application software and services, suc h as ELB, VPN, NAT, traffic mirroring, and DNS. Prerequisites The target VPC, subnet, private IP address, and security group are available.
In the NAT environment, multiple terminals use the same public IP address, and one-to-one connection between the server and client cannot be implemented.
So, the four ECSs (ECS-A01, ECS-A02, ECS-B01, and ECS-B02) can communicate with each other, but they cannot receive traffic from the NAT gateway.
This parameter cannot be set to 1 if NAT is enabled. Otherwise, an error will occur in remote ECS logins. For details, see Why Are Connections to a Linux ECS Using SSH or to Applications on the ECS Interrupted Occasionally?