Problem when setting 802.1x authentication in Ubuntu 16.04

5,344

We had a similar problem and have found a work-around. We created a new network connection and set the appropriate fields using the nmcli program. This worked properly; we could not find a way to use the network-manager applet successfully. Here is a summary of what we did (proper values must be substituted for values within brackets [])

  1. Determine the interface name using:

    nmcli d
    
  2. Create a new connection using:

    nmcli con add type ethernet con-name [connection-name] ifname [interface-name] ip4
    
  3. Set the 802.1x params using:

    nmcli con mod [connection-name] 802-1x.eap tls 802-1x.client-cert [path to client cert] 802-1x.private-key-password [password] 802-1x.private-key [path to private key] 802-1x.identity [your identity] 802-1x.ca-cert [path to CA cert]
    
  4. Bring up the connection using:

    nmcli con up [connection-name]
    

In our case, we had separate files for the CA certificate (ca.pem), client certificate (client.crt) and private key (client.pem). If you have a .p12 file, I believe you can use openssl to create the client certificate and private key.

I'm not sure all these steps are necessary, but I did try to use nmcli to modify an existing connection but it did not work for me (I may have made a mistake).

Share:
5,344

Related videos on Youtube

NiVeR
Author by

NiVeR

Updated on September 18, 2022

Comments

  • NiVeR
    NiVeR over 1 year

    I live in a campus and we need to set certificates and private key in 802.1x tab to connect. The problem is that when I try to add the private key, it says: "Unencrypted private keys are insecure" and it doesn't allow me to complete the procedure. This happens when I try to drag and drop the private key directly, otherwise Ubuntu doesn't show at all any file, using the 'open' button.I attach also a picture with more details.enter image description here

    Any solution to this?

    Best regards, Ervin

  • NiVeR
    NiVeR almost 8 years
    Thank you for your answer. The connection should be started each time or is a one time procedure?
  • tim.j
    tim.j almost 8 years
    Should be a one-time procedure; just used to start the connection after your setup is complete.