Help Center/ Intelligent EdgeFabric/ FAQs/ Edge Application FAQs/ What Do I Do If a Containerized Application Cannot Access External IP Addresses
Updated on 2022-02-21 GMT+08:00

What Do I Do If a Containerized Application Cannot Access External IP Addresses

Symptom

The edge node can access external IP addresses, but the containerized application cannot access external IP addresses.

Possible Causes

The IP forwarding function of the edge node is not enabled.

Solution

Enable the IP forwarding function on the edge node. The following uses CentOS as an example.

  1. Run the following command on the edge node to check whether the IP forwarding function is enabled:

    cat /proc/sys/net/ipv4/ip_forward

    If the query result is 1, the function is enabled, and you need to check other causes. If the query result is 0, the function is disabled. In this case, go to 2.

  2. If you only want to enable the function temporarily, run the following command. The temporary solution is applicable to the scenario where the edge node does not restart.

    echo 1 > /proc/sys/net/ipv4/ip_forward

  3. To enable it permanently, add net.ipv4.ip_forward=1 to the /etc/sysctl.conf file.

    vim /etc/sysctl.conf

  4. Load the file for the change to take effect.

    sysctl -p