MARWAN docs NOC knowledge base
Docseduroam

Install "eapol_test" tool to test eduroam servers

Build the eapol_test tool on Rocky Linux 9 and use it to test authentication on an eduroam RADIUS server.

Published Sami Ait Ali Oulahcen

In order to verify that our eduroam SP (RADIUS) server correctly handles user authentication requests, we will install the `` eapol_test `` tool that can generate EAP requests similar to the users' and directly test the eduroam inner tunnel from the the command line interface (CLI). The tool should run on the same eduroam SP (RADIUS) server we want to test.
In this tutorial we will install and run eapol_test on Rocky Linux 9.

1. Download the source code#

wget https://w1.fi/releases/wpa_supplicant-2.11.tar.gz

2. Install dependencies#

dnf -y group install "Development Tools"
dnf -y install openssl-devel libnl3-devel dbus-devel

3. Extract and build#

make needs a .config file. Start from the default one and turn on the eapol_test build:

tar -xvf wpa_supplicant-2.11.tar.gz
cd wpa_supplicant-2.11/wpa_supplicant
cp defconfig .config
echo "CONFIG_EAPOL_TEST=y" >> .config
make eapol_test
cp eapol_test /usr/local/bin/

4. Build a configuration file and run a test#

Create the file eapol-ttls.conf with a test account of your IdP. This example uses TTLS with PAP, as in our eduroam IdP with OpenLDAP guide:

eapol-ttls.conf
network={
    ssid="eduroam"
    key_mgmt=WPA-EAP
    eap=TTLS
    phase2="auth=PAP"
    anonymous_identity="anonymous@uni.ma"
    identity="edutest@uni.ma"
    password="edutest-secret-password"
}

For an Active Directory IdP, which needs MSCHAPv2, use PEAP instead:

eapol-peap.conf
network={
    ssid="eduroam"
    key_mgmt=WPA-EAP
    eap=PEAP
    phase2="auth=MSCHAPV2"
    anonymous_identity="anonymous@uni.ma"
    identity="edutest@uni.ma"
    password="edutest-secret-password"
}

Run the test against the local RADIUS server. testing123 is the secret of the localhost client defined in clients.conf:

eapol_test -c eapol-ttls.conf -a 127.0.0.1 -s testing123

The output is long. The last line tells you the result:

MPPE keys OK: 1  mismatch: 0
SUCCESS

FAILURE means the authentication was rejected. Run the RADIUS server in debug mode (systemctl stop radiusd; radiusd -X) in another terminal and run the test again to see why.

Tip

To test the whole roaming path, run the same test from another institution's RADIUS server, or ask your NRO to run it from the national proxy: the request then travels through the eduroam federation to your server.