检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
For more information about NAT Gateway, see NAT Gateway Service Overview. Parent topic: 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.
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.
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
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.
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.
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.
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.
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.
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?
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.
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.
After you change the VPC, you need to reconfigure network-related application software and services, such as ELB, VPN, NAT, and DNS.