Skip to content

Commit e43a462

Browse files
committed
Make sure nm-auto-defaults: false is used in all ipsec examples
Signed-off-by: Gris Ge <fge@redhat.com>
1 parent e73cf6d commit e43a462

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

devel/yaml_api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,9 @@ interfaces:
16541654
```
16551655

16561656
The `libreswan` section, nmstate provides these properties:
1657+
* `nm-auto-defaults`: Boolean. Please always explicitly set it to `false` for
1658+
aligning libreswan default values instead of NetworkManager default values.
1659+
Default is true for backwards compatibility.
16571660
* `ipsec-interface`: String 'yes' or 'no' or unsigned integer.
16581661
* `authby`: Authentication method. Normally you don't need to set it.
16591662
* `dpddelay`: Integer.
@@ -1682,8 +1685,9 @@ The `libreswan` section, nmstate provides these properties:
16821685
* `type`: `transport` or `tunnel`. The `tunnel` is the default value if not
16831686
defined.
16841687

1685-
Except the `psk` property, all other properties are libreswan specific options,
1686-
please refer to the manpage of `ipsec.conf` for detail meaning of them.
1688+
Except the `psk` and `nm-auto-defaults` properties, all other properties are
1689+
libreswan specific options, please refer to the manpage of `ipsec.conf` for
1690+
detail meaning of them.
16871691

16881692
By default, nmstate will not create any virtual NIC representing the encrypted
16891693
communication, they can be check via `ip xfrm policy` command. The IP provided

features/ipsec.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ interfaces:
1919
enabled: true
2020
dhcp: true
2121
libreswan:
22+
nm-auto-defaults: false
2223
ipsec-interface: "99"
2324
left: 192.0.2.251
2425
leftid: '%fromcert'
@@ -44,13 +45,14 @@ interfaces:
4445
enabled: true
4546
dhcp: true
4647
libreswan:
48+
nm-auto-defaults: false
4749
ipsec-interface: "99"
4850
leftrsasigkey: 0sAwEAAesFfVZqFzRA9F
4951
left: 192.0.2.250
50-
leftid: 'hosta-rsa.example.org'
52+
leftid: '@hosta-rsa.example.org'
5153
right: 192.0.2.150
5254
rightrsasigkey: 0sAwEAAesFfVZqFzRA9E
53-
rightid: 'hostb-rsa.example.org'
55+
rightid: '@hostb-rsa.example.org'
5456
ikev2: insist
5557
```
5658

@@ -68,24 +70,21 @@ interfaces:
6870
enabled: true
6971
dhcp: true
7072
libreswan:
73+
nm-auto-defaults: false
7174
ipsec-interface: "99"
7275
right: 192.0.2.153
73-
rightid: 'hostb-psk.example.org'
76+
rightid: '@hostb-psk.example.org'
7477
left: 192.0.2.250
75-
leftid: 'hosta-psk.example.org'
78+
leftid: '@hosta-psk.example.org'
7679
psk: "JjyNzrnHTnMqzloKaMuq2uCfJvSSUqTYdAXqD2U2OCFyVIJUUEHmXihBbPrUcmik"
80+
authby: secret
7781
ikev2: insist
7882
```
7983

8084
The PSK method should be only used for test/develop purpose.
8185

8286
# IPSec Host-to-Host/P2P tunnel
8387

84-
By default, NetworkManager libreswan plugin is expecting client-server IPSec
85-
tunnel. In order to get it works for P2P(Host-to-Host) IPSec tunnel, please
86-
explicitly set `rightsubnet` to remote /32 IPv4 address and
87-
`leftmodecfgclient: no`.
88-
8988
For example, assuming remote IPSec host IP is `192.0.2.155` and local IP is
9089
`192.0.2.248`
9190

@@ -94,13 +93,12 @@ interfaces:
9493
- name: hosta_conn
9594
type: ipsec
9695
libreswan:
96+
nm-auto-defaults: false
9797
left: 192.0.2.248
98-
leftid: 'hosta.example.org'
98+
leftid: '@hosta.example.org'
9999
leftcert: hosta.example.org
100-
leftmodecfgclient: no
101100
right: 192.0.2.155
102-
rightid: 'hostb.example.org'
103-
rightsubnet: 192.0.2.155/32
101+
rightid: '@hostb.example.org'
104102
ikev2: insist
105103
```
106104

@@ -136,6 +134,7 @@ interfaces:
136134
enabled: true
137135
dhcp: true
138136
libreswan:
137+
nm-auto-defaults: false
139138
type: transport
140139
ipsec-interface: "99"
141140
left: 192.0.2.251

0 commit comments

Comments
 (0)