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.
- 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.
- 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
- To enable it permanently, add net.ipv4.ip_forward=1 to the /etc/sysctl.conf file.
vim /etc/sysctl.conf
- Load the file for the change to take effect.
sysctl -p
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot