What are the upsides and downsides of using EAP-TLS authentication with certificates for WiFi client connections? How is this superior than just using standard WPA2 password authentication?
How do I configure EAP-TLS authentication for an MikroTik router?
Using EAP-TLS certificates to authenticate WiFi clients:
Upsides:
Downsides:
HowTo COMPATIBILITY:
RouterOS Versions: Procedures were documented and developed using ***RouterOS v6.45.1 through v 6.46 ***. Tested & known to work correctly as of 20191214.
Certificate Creation Procedures: Tested and known to work with IOS 11-13.3 and OSX Mojave and Catalina clients. YMMV if connecting Windows or other clients using EAP-TLS.
WARNING:
The RouterOS CLI commands offered in this tutorial make excellent templates. But you MUST review and change my place holders and default values including the certificate export passphrase before executing commands in this tutorial.
CONFIGURATION PROCESS OVERVIEW: MikroTik ROUTER
A) CREATE CERTIFICATES: (3) types of certs must be created:
Server: Create a Certificate for MikroTik side of EAP-TLS connection. This will be used by the wireless interface using EAP-TLS authentication.
Client(s): Create a certificate for EACH Client connecting to the SSID using the wireless interface we configure for EAP-TLS.
Certificate Authority: This certificate used to create a Chain of Trust for certs by signing both Client & Server certs.
B) CONFIGURE Wireless Security Profiles: Specify the certificates in Wireless Security Profiles. We will create a wireless
Security Profile
for the wireless interface using EAP-TLS authentication and for each connecting client.C) CONFIGURE Wireless Interface: Finally, we will create a wireless interface specifying the wireless
Security Profile
for the interface.SECTION 1: CREATE CERTIFICATES
Create CA (Certificate Authority) Certificate:
Export a PEM Format Cert:
The command
/certificate export-certificate
creates (2) new certs in files:Export a PKCS12 Format Cert:
Appending
type=pkcs12
to the/certificate export-certificate
command will produce the following in Files":Create SERVER Certificate:
This is the certificate used by the MikroTik's wireless interface offering EAP-TLS authentication.
NOTE: You'll remark in
key-usage
I additionally specifyipsec-tunnel,ipsec-end-system
. I use the same certs for both WiFi and VPN access, making it easy to centrally revoke a cert for both services if a server is compromised or to revoke a user's access.Export a PEM Format Cert:
Export a PKCS12 Format Cert: Apple Clients require pkcs12 certs, so we will export all Client certs additionally in pkcs12 format
Repeat above process to create a unique certificate for EACH connecting client.
Create CLIENT Certificates:
An example for a MacBook is shown below, however the process is the same for any device supporting EAP-TLS auth.
Export a PEM Format Cert:
Export a PKCS12 Format Cert:
SECTION 2: CONFIGURE WIRELESS SECURITY PROFILES
After creating certificates for each connecting wireless client using EAP-TLS authentication, you can use these certificates to create Wireless Security Profile's.
Unlike standard WPA2 password encryption which sets a single password for all connecting clients, since each wireless client will have a unique certificate, we must create a Security Profile for each device and the wireless interface itself.
SERVER
Security Profile
CLIENT
Security Profile
Repeat the above command for each device authenticating with EAP-TLS, remembering to change the name of the certificate.
SECTION 3: CONFIGURE VIRTUAL AP WITH EAP AUTH
Finally configure a wireless interface to use the server's EAP-TLS Security Profile:
BACKUP CONFIG AND CERTIFICATES:
Now that you've gone to all this effort, ensure you backup the config. I use the naming convvention for my backups RBmodelNumber-YearMonthDay-Time_ROSversionNumber.rsc:
PLEASE NOTE*: Although you can restore the configuration to a new MikroTik, those backups won't capture your certificates. Open a web browser and connect to the MikroTik via a WebGUI. Go to the "Files" menu and you can download each of them to your laptop and then punt them somewhere secure & sensible for long-term storage.
CLIENT CONFIGURATION
To learn how to configure IOS & OSX Clients to use EAP-TLS authentication, go HERE