[Bug 1966047] Re: the wireguard netplan is being created in the wrong format - still creates tunnels instead of nm-devices

Lukas Märdian 1966047 at bugs.launchpad.net
Wed Mar 23 12:19:58 UTC 2022


*** This bug is a duplicate of bug 1962297 ***
    https://bugs.launchpad.net/bugs/1962297

Citing Rahul from the snapcraft forum:
> I moved core20 to candidate channel and now it creates the right netplan with nm-devices.
> Thanks for the help. Do you know hen this would be pushed into stable?

I'm therefore marking this bug as a duplicate.

** This bug has been marked a duplicate of bug 1962297
   [SRU] NetworkManager parser: ip-tunnel connections fail

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1966047

Title:
  the wireguard netplan is being created in the wrong format -  still
  creates tunnels instead of nm-devices

Status in netplan.io package in Ubuntu:
  New

Bug description:
  How to recreate my error:
  I ran it on CM4 arm64 architechture with Ubuntu Server 20.04 with :
  netplan.io at  0.103-0ubuntu5~20.04.6 arm64
  network-manager snap at   20/stable:  1.22.10-11

  - Install network manager snap:
      sudo snap install network-manager

  - Remove network manager that is installed as apt package(if any):
      sudo apt remove network-manager

  - Install wireguard and wireguard tools:
      sudo apt install wireguard wireguard-tools

  - Create a wiregurad conf file in /etc/wireguard in the format:
      Ref: https://www.wireguard.com/quickstart/
      #########
      [Interface]
      Address = 10.0.0.5/32
      PrivateKey = <private key>

      [Peer]
      PublicKey = <public key>
      AllowedIPs = 10.0.0.0/24
      Endpoint = < end point>
      PersistentKeepalive = 20
      ##########

  - bring up this connection:
      sudo wg-quick up <conf file name>

      This would perform the following steps:
      [#] ip link add <conf file name> type wireguard
      [#] wg setconf <conf file name> /dev/fd/63
      [#] ip -4 address add 10.0.0.5/32 dev <conf file name>
      [#] ip link set mtu 1420 up dev <conf file name>
      [#] ip -4 route add 10.0.0.0/24 dev <conf file name>

  - This creates a NM snap connection which would be active and also
  creates a netplan in /etc/netplan:

  - Run netplan generate, this would fail because the netplan generated is in wrong format:
      sudo netplan generate

  - Returns:
      missing 'mode' property for tunnel
        renderer: NetworkManager
        ^

  - the netplan generated is:
      network:
      version: 2
      tunnels:
        nm-name:
          renderer: NetworkManager
          addresses:
          - "<address>"
          ipv6-address-generation: "stable-privacy"
          networkmanager:
            uuid: "<uuid>"
            name: "<name>"
            passthrough:
              connection.type: "wireguard"
              connection.autoconnect: "false"
              connection.permissions: ""
              connection.timestamp: "1647848473"
              wireguard.listen-port: "59015"
              wireguard-peer.<peer-id>.endpoint: ""
              ipv4.dns-priority: "100"
              ipv4.dns-search: ""
              ipv6.dns-priority: "100"
              ipv6.dns-search: ""
              ipv6.method: "ignore"
              proxy._: ""

  - Reboot the system:

  - Upon reboot you will observe that the wifi is down:
      nmcli d
      nmcli c

  - To recover remove the files related to wireguard at : /etc/netplan
      sudo wg-quick down <conf file name>

  - reload Nm connections:
      sudo nmcli c reload

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1966047/+subscriptions




More information about the foundations-bugs mailing list