检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
(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.
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.
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?