How to secure your Wifi with EAP-TTLS and tunneled PAP

Introduction

This HOWTO was written as a counterpoint to all the EAP-TTLS HOWTOs on the web which start with "first, install 389ds".

Although having a 389 directory server is a benefit to busy LANs which provide resources to many users, there is little benefit running it on a network such as the home network which only contains phones and tablets.

Why

The main reason to implement Extensible Authentication Protocol (EAP) in a home LAN is to avoid the ability of wardrivers to deduce your pre-shared key (PSK) from packet captures. Given a long enough PSK I doubt if this is yet an issue, but on phones and tablets a long PSK is inconvent to type in.

How

Instead of a PSK, the Wifi router will communicate over a TLS tunnel with the client, which is not believed to be crackable by a wardriver. The client which trusts the TLS certificate the Wifi router presents, will send its unencrypted password inside the tunnel and this authorises it to use the LAN.

Usual password policies should be practiced here: password length and complexity. The wardriver who tries to connect using the TLS tunnel will have to guess the username/password combination. The default rate limiting in freeradius's EAP configuration makes this infeasible for the wardriver but does introduce a possible denial of service (DOS) attack vector.

Install

Note: there are some sed-fu below which rely on commands being run in the order shown

Testing

If it all worked correctly, you can continue adding proper user accounts for everyone who will use your Wifi, using the "echo testuser..." command as above, but with a proper username instead of "testuser". Don't forget to systemctl restart freeradius when you are done.

Caveats

Further considerations