This document provides a detailed guide on enabling and disabling IPsec encrypted tunnel traffic in the Kube-OVN Overlay network. Since OVN tunnel traffic is transmitted through physical routers and switches, which may be located in untrusted public networks or at risk of attacks, enabling IPsec encryption can effectively prevent traffic data from being monitored and tampered with.
Term | Explanation |
---|---|
IPsec | A protocol and technology used to protect and validate data transmitted over the internet. It provides secure communication at the IP layer and is primarily used to create virtual private networks (VPNs) and protect the transmission of IP packets. IPsec ensures data security primarily through the following methods:
|
Enabling IPsec may cause a few seconds of network interruption.
If the kernel version is 3.10.0-1160.el7.x86_64, enabling the IPsec feature of Kube-OVN may encounter compatibility issues.
Please execute the following command to check whether the current operating system kernel supports IPsec-related modules. If the output shows that all XFRM-related modules are y
or m
, it indicates support for IPsec.
Output:
Note: Unless otherwise specified, the following commands must be executed in the CLI tool on the cluster Master node.
Modify the configuration file of kube-ovn-controller.
Execute the following command to edit the YAML configuration file of kube-ovn-controller.
Modify the specified fields according to the following instructions.
Field explanations:
- --enable-ovn-ipsec=true
under this field.Save the changes.
Modify the kube-ovn-cni configuration file.
Execute the following command to edit the YAML configuration file of kube-ovn-cni.
Modify the specified fields according to the following instructions.
Field explanations:
- --enable-ovn-ipsec=true
under this field.Save the changes.
Verify whether the feature has been successfully enabled.
Execute the following command to enter the kube-ovn-cni Pod.
Execute the following command to check the number of Security Associations connections. If there are (number of nodes - 1) up, it indicates a successful enablement.
Output:
Modify the configuration file of kube-ovn-controller.
Execute the following command to edit the YAML configuration file of kube-ovn-controller.
Modify the specified fields according to the following instructions.
Field explanations:
enable-ovn-ipsec
to false.Save the changes.
Modify the kube-ovn-cni configuration file.
Execute the following command to edit the YAML configuration file of kube-ovn-cni.
Modify the specified fields according to the following instructions.
Configuration before modification
Field explanations:
enable-ovn-ipsec
to false.Configuration after modification
Save the changes.
Verify whether the feature has been successfully disabled.
Execute the following command to enter the kube-ovn-cni Pod.
Execute the following command to check the connection status. If there is no output, it indicates successful disabling.