Raspberry Pi in Turmlabor-WLAN (IEEE 802.1x) einbinden

From Turmlabor Wiki
Revision as of 09:50, 10 June 2023 by Mariust (talk | contribs) (Undo revision 283 by Mariust (talk))
Jump to navigation Jump to search


Zur Konfiguration muss das Paket "Network Manager" installiert werden.
apt install network-manager nmcli

Danach in der Raspi-Config den Network Manager aktivieren
sudo raspi-config
Advanced Options > Network Config > Network Manager

Mit nmcli die Verbindung anlegen
read -p "username: " username && read -s -p "password: " password && nmcli connection add type wifi con-name "turmlabor" ifname wlan0 ssid "turmlabor" -- wifi-sec.key-mgmt wpa-eap wifi-sec.auth-alg open 802-1x.eap ttls 802-1x.phase2-auth pap 802-1x.identity "$username" 802-1x.password "$password"

Bei anderen Geräten muss der Interface Name (ifname, wlan0 nur für Raspi) angepasst werden.


Die Connection-Datei sollte etwa so aussehen:
cat /etc/NetworkManager/system-connections/turmlabor.nmconnection

[connection]
id=turmlabor
uuid=$UUID             #kann nicht sinnvoll manuell gesetzt werden, wird von CLI-Tool erzeugt
type=wifi
interface-name=wlan0
permissions=user:pi:;

[wifi]
mac-address-blacklist=
mode=infrastructure
ssid=turmlabor

[wifi-security]
auth-alg=open
key-mgmt=wpa-eap

[802-1x]
eap=ttls;
identity=$USER
password=$PASSWORD
phase2-auth=pap

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

[proxy]