How to configure wireless (WLAN) and wired connections for 802.1x authorization

Wireless with NetworkManager

  1. Click on the network-settings symbol on the task bar of the Ubuntu desktop.
  2. In the upcoming menu click 'edit connections'.
  3. In Tab:Wireless choose the name of your current wireless connection and click button 'edit'.

  4. In the upcoming window click Tab:'Wireless Security', make the following settings and enter your NETHZ name and password (example). 802.1xWirelessSettings.png

    NOTE THE USERNAME FIELD SYNTAX VARIES BETWEEN USERS:
    
    In the "Username" field of the above dialog enter the following:
    <username>@student-net.ethz.ch, if your are student at ETH
    <username>@staff-net.ethz.ch, if your are a staff member of ETH
    <username>@guest-net.ethz.ch, if your are a guest at ETH
    
    As password, enter your ETH network password
  5. Click 'Save...'. In the upcoming "No Certificate Authority..." window click button 'Ignore'.
  6. Click button 'close'

Wireless with iwd

At the time of writing this section, no GUI method to create configurations for iwd existed. Setup has to be done manually.

Store the eduroam public certificate

At the time of writing this section, iwd didn't accept PEAP configurations without an existing EAP-PEAP-CACert (See configuration below). For this reason the public certificate chain of the ETH Radius server (which is identical to the eduroam public certificate chain of ETH) is stored in a file.
The certificate can be extracted from the end of the python installation script generated by the eduroam Configuration Assistant Tool (CAT), for convenience it is stored below.
Save the following text in /var/lib/iwd/eduroam.pem, including the markers for each certificate:

-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK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PgREHzSyrHxVYbH
7rM2kYb2OVG/Rr8PoLq0935JxCo2F57kaDl6r5ROVm+yezu/Coa9zcV3HAO4OLGi
H19+24rcRki2aArPsrW04jTkZ6k4Zgle0rj8nSg6F0AnwnJOKf0hPHzPE/uWLMUx
RP0T7dWbqWlod3zu4f+k+TY4CFM5ooQ0nBnzvg6s1SQ36yOoeNDT5++SR2RiOSLv
xvcRviKFxmZEJCaOEDKNyJOuB56DPi/Z+fVGjmO+wea03KbNIaiGCpXZLoUmGv38
sbZXQm2V0TP2ORQGgkE49Y9Y3IBbpNV9lXj9p5v//cWoaasm56ekBYdbqbe4oyAL
l6lFhd2zi+WJN44pDfwGF/Y4QA5C5BIG+3vzxhFoYt/jmPQT2BVPi7Fp2RBgvGQq
6jG35LWjOhSbJuMLe/0CjraZwTiXWTb2qHSihrZe68Zk6s+go/lunrotEbaGmAhY
LcmsJWTyXnW0OMGuf1pGg+pRyrbxmRE1a6Vqe8YAsOf4vmSyrcjC8azjUeqkk+B5
yOGBQMkKW+ESPMFgKuOXwIlCypTPRpgSabuY0MLTDXJLR27lk8QyKGOHQ+SwMj4K
00u/I5sUKUErmgQfky3xxzlIPK1aEn8=
-----END CERTIFICATE-----

Generate your WLAN password hash

Issue the following command pipeline in your shell:

iconv -t utf16le |openssl md4

Enter your WLAN password and finish by pressing <Ctrl-D> twice. Don't press <Enter> after typing your password!
You will see an output containing the hash of your password on the right side like

my password typed in here(stdin)= 1ecca157ecd74790f4c147ec0e3c2c17

Keep the generated hash of your password for the next stage.

Create the first config file of all ETH SSIDs

As user root or with sudo privileges, create the first config file for SSID eduroam in /var/lib/iwd/eduroam.8021x:

[Security]
EAP-Method=PEAP
EAP-Identity=<ETH account>@<staff|student|guest>-net.ethz.ch
EAP-PEAP-CACert=/var/lib/iwd/eduroam.pem
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=<ETH account>@<staff|student|guest>-net.ethz.ch
EAP-PEAP-Phase2-Password-Hash=<My password hash>

[Settings]
AutoConnect=false

Create further WLAN config files

If you want to keep AutoConnect=false for all further ETH SSIDs you want to configure, the configuration files will be identical to eduroam.8021xand you can simply create links for each SSID (still with elevated privileges):

cd /var/lib/iwd/
ln -fs eduroam.8021x eduroam-5.8021.x
ln -fs eduroam.8021x eth.8021.x
ln -fs eduroam.8021x eth-5.8021.x

For individual configurations per SSID you obiously have to create a file for each SSID.

Wired with NetworkManager

  1. Click on the network-settings symbol on the task bar of the Ubuntu desktop.
  2. In the upcoming menu click 'edit connections'.
  3. In Tab:Wired choose your network profile and click button 'edit'.

  4. In the upcoming window click Tab:'802.1x Security', make the following settings and enter your NETHZ name and password: 802.1xWiredSettings.png

    NOTE THE USERNAME FIELD SYNTAX VARIES BETWEEN USERS:
    
    In the "Username" field of the above dialog enter the following:
    <username>@student-net.ethz.ch, if your are student at ETH
    <username>@staff-net.ethz.ch, if your are a staff member of ETH
    <username>@guest-net.ethz.ch, if your are a guest at ETH
    
    As password, enter your ETH network password
  5. Click 'Save...'. In the upcoming "No Certificate Authority..." window click button 'Ignore'.
  6. Click button 'close'


CategoryNET

Workstations/Network/Infrastructure/802.1xUbuntu (last edited 2022-04-29 07:46:25 by stroth)