You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nw-ovn-ipsec-north-south-enable.adoc
+56-47Lines changed: 56 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,36 +6,36 @@
6
6
[id="nw-ovn-ipsec-north-south-enable_{context}"]
7
7
= Configuring IPsec encryption for external traffic
8
8
9
-
As a cluster administrator, to encrypt external traffic with IPsec you must configure IPsec for your network infrastructure, including providing PKCS#12 certificates. Because this procedure uses Butane to create machine configs, you must have the `butane` command installed.
9
+
[role="_abstract"]
10
+
As a cluster administrator, to encrypt external traffic with IPsec you must configure IPsec for your network infrastructure, including providing PKCS#12 certificates. Because this procedure uses Butane to create machine configs, you must have the `butane` tool installed.
10
11
11
12
[NOTE]
12
13
====
13
-
After you apply the machine config, the Machine Config Operator reboots affected nodes in your cluster to rollout the new machine config.
14
+
After you apply the machine config, the Machine Config Operator (MCO) reboots affected nodes in your cluster to rollout the new machine config.
14
15
====
15
16
16
17
.Prerequisites
17
18
18
19
* Install the {oc-first}.
19
-
* You have installed the `butane`utility on your local computer.
20
+
* You have installed the `butane`tool on your local computer.
20
21
* You have installed the NMState Operator on the cluster.
21
22
* You logged in to the cluster as a user with `cluster-admin` privileges.
22
-
* You have an existing PKCS#12 certificate for the IPsec endpoint and a CA cert in PEM format.
23
+
* You have an existing PKCS#12 certificate for the IPsec endpoint and a CA cert in Privacy Enhanced Mail (PEM) format.
23
24
* You enabled IPsec in either `Full` or `External` mode on your cluster.
24
25
* You must set the `routingViaHost` parameter to `true` in the `ovnKubernetesConfig.gatewayConfig` specification of the OVN-Kubernetes network plugin.
25
26
26
27
.Procedure
27
28
28
-
. Create an IPsec configuration with an NMState Operator node network configuration policy. For more information, see link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/configuring-a-vpn-connection_securing-networks#libreswan-as-an-ipsec-vpn-implementation_configuring-a-vpn-with-ipsec[Libreswan as an IPsec VPN implementation].
29
-
29
+
. Create an IPsec configuration with an NMState Operator node network configuration policy. For more information, see link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_networking/setting-up-an-ipsec-vpn_configuring-and-managing-networking#configuring-an-ipsec-based-vpn-connection-by-using-nmstatectl_setting-up-an-ipsec-vpn[Configuring an IPsec based VPN connection by using nmstatectl].
30
+
+
30
31
.. To identify the IP address of the cluster node that is the IPsec endpoint, enter the following command:
31
32
+
32
33
----
33
34
$ oc get nodes
34
35
----
35
-
36
-
.. Create a file named `ipsec-config.yaml` that contains a node network configuration policy for the NMState Operator, such as in the following examples. For an overview about `NodeNetworkConfigurationPolicy` objects, see link:https://nmstate.io/kubernetes-nmstate/[The Kubernetes NMState project].
37
36
+
38
-
--
37
+
.. Create a file named `ipsec-config.yaml` that has a node network configuration policy for the NMState Operator, such as in the following examples. For an overview about `NodeNetworkConfigurationPolicy` objects, see link:https://nmstate.io/kubernetes-nmstate/[The Kubernetes NMState project].
38
+
+
39
39
.Example NMState IPsec transport configuration
40
40
[source,yaml]
41
41
----
@@ -45,30 +45,33 @@ metadata:
45
45
name: ipsec-config
46
46
spec:
47
47
nodeSelector:
48
-
kubernetes.io/hostname: "<hostname>" <1>
48
+
kubernetes.io/hostname: "<hostname>"
49
49
desiredState:
50
50
interfaces:
51
-
- name: <interface_name> <2>
51
+
- name: <interface_name>
52
52
type: ipsec
53
53
libreswan:
54
-
left: <cluster_node> <3>
54
+
left: <cluster_node>
55
55
leftid: '%fromcert'
56
56
leftrsasigkey: '%cert'
57
57
leftcert: left_server
58
58
leftmodecfgclient: false
59
-
right: <external_host> <4>
59
+
right: <external_host>
60
60
rightid: '%fromcert'
61
61
rightrsasigkey: '%cert'
62
-
rightsubnet: <external_address>/32 <5>
62
+
rightsubnet: <external_address>/32
63
63
ikev2: insist
64
64
type: transport
65
65
----
66
-
<1> Specifies the host name to apply the policy to. This host serves as the left side host in the IPsec configuration.
67
-
<2> Specifies the name of the interface to create on the host.
68
-
<3> Specifies the host name of the cluster node that terminates the IPsec tunnel on the cluster side. The name should match SAN `[Subject Alternate Name]` from your supplied PKCS#12 certificates.
69
-
<4> Specifies the external host name, such as `host.example.com`. The name should match the SAN `[Subject Alternate Name]` from your supplied PKCS#12 certificates.
70
-
<5> Specifies the IP address of the external host, such as `10.1.2.3/32`.
71
-
66
+
+
67
+
where:
68
+
+
69
+
`kubernetes.io/hostname`:: Specifies the hostname to apply the policy to. This host serves as the left side host in the IPsec configuration.
70
+
`name`:: Specifies the name of the interface to create on the host.
71
+
`left`:: Specifies the hostname of the cluster node that terminates the IPsec tunnel on the cluster side. The name must match the SAN `[Subject Alternate Name]` from your supplied PKCS#12 certificates.
72
+
`right`:: Specifies the external hostname, such as `host.example.com`. The name should match the SAN `[Subject Alternate Name]` from your supplied PKCS#12 certificates.
73
+
`rightsubnet`:: Specifies the IP address of the external host, such as `10.1.2.3/32`.
74
+
+
72
75
.Example NMState IPsec tunnel configuration
73
76
[source,yaml]
74
77
----
@@ -78,48 +81,56 @@ metadata:
78
81
name: ipsec-config
79
82
spec:
80
83
nodeSelector:
81
-
kubernetes.io/hostname: "<hostname>" <1>
84
+
kubernetes.io/hostname: "<hostname>"
82
85
desiredState:
83
86
interfaces:
84
-
- name: <interface_name> <2>
87
+
- name: <interface_name>
85
88
type: ipsec
86
89
libreswan:
87
-
left: <cluster_node> <3>
90
+
left: <cluster_node>
88
91
leftid: '%fromcert'
89
92
leftmodecfgclient: false
90
93
leftrsasigkey: '%cert'
91
94
leftcert: left_server
92
-
right: <external_host> <4>
95
+
right: <external_host>
93
96
rightid: '%fromcert'
94
97
rightrsasigkey: '%cert'
95
-
rightsubnet: <external_address>/32 <5>
98
+
rightsubnet: <external_address>/32
96
99
ikev2: insist
97
100
type: tunnel
98
101
----
99
-
<1> Specifies the host name to apply the policy to. This host serves as the left side host in the IPsec configuration.
100
-
<2> Specifies the name of the interface to create on the host.
101
-
<3> Specifies the host name of the cluster node that terminates the IPsec tunnel on the cluster side. The name should match SAN `[Subject Alternate Name]` from your supplied PKCS#12 certificates.
102
-
<4> Specifies the external host name, such as `host.example.com`. The name should match the SAN `[Subject Alternate Name]` from your supplied PKCS#12 certificates.
103
-
<5> Specifies the IP address of the external host, such as `10.1.2.3/32`.
104
-
--
105
-
102
+
+
106
103
.. To configure the IPsec interface, enter the following command:
107
104
+
108
105
[source,terminal]
109
106
----
110
107
$ oc create -f ipsec-config.yaml
111
108
----
112
109
113
-
. Provide the following certificate files to add to the Network Security Services (NSS) database on each host. These files are imported as part of the Butane configuration in later steps.
110
+
. Give the following certificate files to add to the Network Security Services (NSS) database on each host. These files are imported as part of the Butane configuration in the next steps.
114
111
+
115
-
--
116
112
* `left_server.p12`: The certificate bundle for the IPsec endpoints
117
113
* `ca.pem`: The certificate authority that you signed your certificates with
118
-
--
119
114
120
-
. Create a machine config to add your certificates to the cluster:
115
+
. Create a machine config to add your certificates to the cluster.
121
116
122
-
.. To create Butane config files for the control plane and worker nodes, enter the following command:
* `left_server_password`:: The name of the file that contains the password. This file exists in the mounted secret.
125
+
126
+
. Use the `pk12util` tool, which comes prepackaged with {op-system-base-full}, to specify a password that protects `PKCS#12` files by entering the following command. Ensure that you replace the `<password>` value with your password.
. To create Butane config files for the control plane and compute nodes, enter the following command:
123
134
+
124
135
[NOTE]
125
136
====
@@ -179,7 +190,7 @@ EOF
179
190
done
180
191
----
181
192
182
-
.. To transform the Butane files that you created in an earlier step into machine configs, enter the following command:
193
+
. To transform the Butane files that you created in the earlier step into machine configs, enter the following command:
183
194
+
184
195
[source,terminal]
185
196
----
@@ -199,9 +210,11 @@ done
199
210
+
200
211
[IMPORTANT]
201
212
====
202
-
As the Machine Config Operator (MCO) updates machines in each machine config pool, it reboots each node one by one. You must wait until all the nodes to update before external IPsec connectivity is available.
213
+
As the Machine Config Operator (MCO) updates machines in each machine config pool, it reboots each node one by one. You must wait for all the nodes to update before external IPsec connectivity is available.
203
214
====
204
215
216
+
.Verification
217
+
205
218
. Check the machine config pool status by entering the following command:
206
219
+
207
220
[source,terminal]
@@ -217,6 +230,7 @@ By default, the MCO updates one machine per pool at a time, causing the total ti
217
230
====
218
231
219
232
. To confirm that IPsec machine configs rolled out successfully, enter the following commands:
233
+
+
220
234
.. Confirm the creation of the IPsec machine configs:
221
235
+
222
236
[source,terminal]
@@ -230,22 +244,17 @@ $ oc get mc | grep ipsec
230
244
80-ipsec-master-extensions 3.2.0 6d15h
231
245
80-ipsec-worker-extensions 3.2.0 6d15h
232
246
----
233
-
234
-
.. Confirm the application of the IPsec extension to control plane nodes. Example output would show `2`.
247
+
+
248
+
.. Confirm you have applied the IPsec extension to control plane nodes:
For IPsec encryption of pod-to-pod traffic, the following sections describe which specific pod-to-pod traffic is encrypted, what kind of encryption protocol is used, and how X.509 certificates are handled. These sections do not apply to IPsec encryption between the cluster and external hosts, which you must configure manually for your specific external network infrastructure.
* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/configuring_and_managing_networking/setting-up-an-ipsec-vpn[Configuring a VPN with IPsec] in {op-system-base-full} 10
Zero trust is an approach to designing security architectures based on the premise that every interaction begins in an untrusted state. This contrasts with traditional architectures, which might determine trustworthiness based on whether communication starts inside a firewall. More specifically, zero trust attempts to close gaps in security architectures that rely on implicit trust models and one-time authentication.
11
10
12
11
{product-title} can add some zero trust networking capabilities to containers running on the platform without requiring changes to the containers or the software running in them. There are also several products that Red Hat offers that can further augment the zero trust networking capabilities of containers. If you have the ability to change the software running in the containers, then there are other projects that Red Hat supports that can add further capabilities.
@@ -30,7 +29,7 @@ Ensure that all traffic on the wire is encrypted and the endpoints are identifia
30
29
31
30
Leverage:
32
31
33
-
* {product-title}: With transparent xref:../../networking/network_security/configuring-ipsec-ovn.adoc#configuring-ipsec-ovn-pod-to-pod-ipsec[pod-to-pod IPsec], the source and destination of the traffic can be identified by the IP address. There is the capability for egress traffic to be xref:../../networking/network_security/configuring-ipsec-ovn.adoc#nw-ovn-ipsec-north-south-enable_configuring-ipsec-ovn[encrypted using IPsec]. By using the xref:../../networking/ovn_kubernetes_network_provider/configuring-egress-ips-ovn.adoc#configuring-egress-ips-ovn[egress IP] feature, the source IP address of the traffic can be used to identify the source of the traffic inside the cluster.
32
+
* {product-title}: With transparent xref:../../networking/network_security/configuring-ipsec-ovn.adoc#pod-to-pod-ipsec_configuring-ipsec-ovn[pod-to-pod IPsec], the source and destination of the traffic can be identified by the IP address. There is the capability for egress traffic to be xref:../../networking/network_security/configuring-ipsec-ovn.adoc#nw-ovn-ipsec-north-south-enable_configuring-ipsec-ovn[encrypted using IPsec]. By using the xref:../../networking/ovn_kubernetes_network_provider/configuring-egress-ips-ovn.adoc#configuring-egress-ips-ovn[egress IP] feature, the source IP address of the traffic can be used to identify the source of the traffic inside the cluster.
34
33
* xref:../../service_mesh/v2x/ossm-about.adoc#ossm-about[{SMProductName}]: Provides powerful xref:../../service_mesh/v2x/ossm-security.adoc#ossm-security-mtls_ossm-security[mTLS capabilities] that can transparently augment traffic leaving a pod to provide authentication and encryption.
35
34
* xref:../../security/cert_manager_operator/index.adoc#cert-manager-operator-about[OpenShift cert-manager Operator]: Use custom resource definitions (CRDs) to request certificates that can be mounted for your programs to use for SSL/TLS protocols.
0 commit comments