xfrm interfaces not supported

Bug #1905280 reported by Jean-Sébastien Frerot
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Netplan
New
Wishlist
Unassigned

Bug Description

for VPN connections, in my case using strongswan, I'm not able to setup xfrm interfaces with netplan. I have to go back to ifupdown and use pre-up command:
"ip link add ipsec0 type xfrm dev eth0 if_id 42"

It would be nice for netplan to support such interfaces.

strongswan ref: https://wiki.strongswan.org/projects/strongswan/wiki/RouteBasedVPN#XFRM-Interfaces-on-Linux

Revision history for this message
Junien F (axino) wrote :

xfrm is supported by networkd by the way
https://www.freedesktop.org/software/systemd/man/systemd.network.html | grep xfrm

Revision history for this message
adamretter (adam-retter) wrote :

+1 for this. I would also prefer to configure my XFRM interface and its routing via Netplan.

Revision history for this message
adamretter (adam-retter) wrote :

For the time being I have worked around the deficiency by using the networkd-dispatcher. I created the script `/etc/networkd-dispatcher/routable.d/50-xfrm`:

```
#!/bin/sh

ip link add xfrm0 type xfrm dev eno3 if_id 0xabcd
ip address add 10.0.1.254/32 dev xfrm0
ip link set xfrm0 up
ip route add 10.0.2.254/32 dev xfrm0
```

Revision history for this message
Junien F (axino) wrote :

@adam-retter If you're using systemd-networkd, I suggest using the native xfrm implementation - see https://systemd.network/systemd.netdev.html and https://systemd.network/systemd.network.html (grep xfrm in these pages)

Revision history for this message
Mike Brown (mikebrown345) wrote :

Another +1 for this.

A note for others - the systemd-networkd version-237 which comes with Ubuntu 18.04 does not support XFRM in the [netdev] spec. So options seem to be:

A) On Ubuntu 18.04 use a network-dispatcher script (as @adamretter put down)
B) On Ubuntu 18.04 upgrade systemd to gain access to xfrm**
C) Use Ubuntu 20.04 systemd-networkd
D) Hop onto launchpad.net to leave a +1 for netplan to support the explosion of new network features in systemd

**I wanted to see how irksome this would be so I upgraded 237 to 245.4 mostly following these instructions https://gist.github.com/Jiab77/7df6e80804567f6f599b227cf2fafd00
On an AWS t2.micro it took 20 minutes for dpkg to compile everything.

Lukas Märdian (slyon)
Changed in netplan:
importance: Undecided → Wishlist
Revision history for this message
NWhisper (night-whisper) wrote :

+100500 for this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.