3.2 Configuring a Hostapd Server
Perform the following steps to configure the hostapd server:
- Download hostapd from https://w1.fi/releases/hostapd-2.6.tar.gz and copy it to an Ubuntu machine.
- Create a
.configfile enabling hostapd as a RADIUS server. See Appendix B - Hostapd Example.configFile for an example configuration file. - Untar the file and navigate to the
hostapd-2.6/hostapddirectory in the terminal window. - Build the binaries using the
makecommand. - Enter the
make installcommand to copy thehostapdbinary to the/user/local/bin/path. - Generate the certificates (see Generating Certificates using
openssl). - Add the following to configure or
create AP details in the file
hostapd.radius_clients(the password must be the same as the shared key password in point 4).# RADIUS client configuration for the RADIUS server 0.0.0.0/0 123456789 - Create an
eapuser file (see Appendix C - Configuring EAP User File). - Create a
hostapd.conffile, using the aboveeapuser file as shown below.# Run hostapd as a RADIUS server radius_server_clients=hostapd.radius_clients radius_server_auth_port=1812 eap_server=1 # For EAP user file see section 5.3 eap_user_file=hostapd.eap_user # TLS parameters (shared by EAP-PEAP, EAP-TTLS, EAP-FAST) ca_cert=cas.cert # Server certificate and private key from separate files server_cert=server.crt private_key=server.key - Run
hostapdusing the sudo ./hostapd -dkt -i eno1 hostapd.conf command.
