All Products
Document Center

Failed to access the instance through a NAT Linux due to kernel configuration issues.

Last Updated: Dec 29, 2020

Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.


Problem description

You cannot connect to a Linux instance through SSH, and the HTTP service on this instance is also abnormal. A network test using the telent Command found that the requested connection was reset.



Local networks surf the Internet through NAT sharing, and Linux kernel parameter related configuration exceptions.



Modify the system kernel parameter to solve the problem.

  1. Log on to the system through the management terminal.
  2. Run the following commands successively to check the current kernel configuration and confirm that the value of this parameter is 1:
    cat /proc/sys/net/ipv4/tcp_tw_recycle
    cat /proc/sys/net/ipv4/tcp_timestamps
  3. Add the following content to the /etc/sysctl.conf configuration file.
  4. Run the following command to make the configurations take effect:
    sysctl -p
  5. Confirm that you can access the instance.


Application scope

  • ECS


If your problem is still not solved, please submit a ticket to contact Alibaba Cloud technical support.