Raspberry Pi in Turmlabor-WLAN (IEEE 802.1x) einbinden: Difference between revisions

From Turmlabor Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


Mit nmcli die Verbindung anlegen<br>
Mit nmcli die Verbindung anlegen<br>
<code>read -p "username: " username && \
<code>read -p "username: " username && read -s -p "password: " password && nmcli connection add type wifi con-name "turmlabor" ifname wlp2s0 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"</code>
read -s -p "password: " password && \
nmcli connection add \
type wifi con-name "turmlabor" ifname wlp2s0 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"
</code>





Revision as of 09:46, 10 June 2023


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 wlp2s0 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"


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]