Score:0

Netplan: Access Point setup with WPA2 authentication

aq flag
DJR

I can successfully set up a Raspberry Pi running Ubuntu 22.04 Server to act as an access point with netplan.

It's set up as per the details in https://netplan.io/reference#properties-for-device-type-wifis which states "Enable WPA2 authentication and set the passphrase for it."

But when I connect to it from Windows, it states that the security type is "WPA-Personal", while connecting to another router I have, I see a security type of "WPA2-Personal". This suggests to me that the connection to the Raspberry Pi is only WPA and not WPA2.

I have tried numerous combinations of options, but with no success.

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      dhcp4: true
      optional: true
      access-points:
        "APNAME":
          auth:
            key-management: psk
            password: "Password"
          mode: ap
          band: 5GHz
Score:0
in flag

IIUC the NetworkManager backend uses WPA+WPA2 security by default on any hotspot/AP setup.

You should be able to view the supported security protocols, using: nmcli device wifi list

NetworkManager can be forced to use WPA (wifi-security.proto=wpa) or WPA2 (wifi-security.proto=rsn) only, but Netplan cannot control this setting natively. You should be able to use a passthrough setting to control it, though:

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      dhcp4: true
      optional: true
      access-points:
        "APNAME":
          auth:
            key-management: psk
            password: "Password"
          mode: ap
          band: 5GHz
          networkmanager:
            passthrough:
              wifi-security.proto: "rsn" # WPA2 only
              #wifi-security.group: "ccmp" # optionally choose encryption algorithm
              #wifi-security.pairwise: "ccmp" # optionally choose encryption algorithm
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.