EAP-PEAP-TLS

What is Expansion of EAP-PEAP-TLS?

EAP-PEAP-TLS stands for Extensible Authentication Protocol - Protected Extensible Authentication Protocol - Transport Layer Security.

What is EAP-PEAP-TLS?

EAP-PEAP-TLS is an EAP authentication method that uses a secure TLS tunnel to protect authentication data. It combines PEAP (which establishes the TLS tunnel) with TLS-based client authentication inside the tunnel.

Why is EAP-PEAP-TLS useful?

  • Provides strong mutual authentication and encryption.

  • Protects user credentials inside a secure tunnel.

  • Suitable for enterprise wireless and wired network access.

  • Resistant to replay and man-in-the-middle attacks.

How it works?

  • A TLS tunnel is established between the client and the authentication server using the server certificate.

  • Client authenticates using TLS (usually via client certificate).

  • Inside the tunnel, credentials are exchanged and verified.

  • On success, a shared Master Key (MSK) is derived.

Where is EAP-PEAP-TLS used?

  • Enterprise Wi-Fi networks (e.g., WPA2-Enterprise, WPA3-Enterprise).

  • 802.1X wired network authentication.

  • Scenarios requiring strong certificate-based security.

Which OSI layer does this protocol belong to?

  • Operates at the Application Layer (Layer 7).

  • Uses lower layers (like TLS over TCP/IP) for transport.

IS EAP-PEAP-TLS Windows specific?

  • No, it is not Windows-specific.

  • Supported across multiple platforms like Windows, Linux, macOS, and mobile OSes.

IS EAP-PEAP-TLS Linux Specific?

  • No, it is not Linux-specific.

  • Supported on various OS platforms that support EAP and TLS libraries.

Which Transport Protocol is used by EAP-PEAP-TLS?

  • Uses TLS over TCP for transport.

  • Encapsulated within EAP over LAN (EAPOL) or RADIUS for backend transport.

Which Port is used by EAP-PEAP-TLS?

  • Uses RADIUS server ports: * UDP 1812 (Authentication) * UDP 1813 (Accounting)

  • TLS tunnel typically uses internal transport within RADIUS/EAP.

Is EAP-PEAP-TLS using Client Server model?

  • Yes, it follows a client-server model.

  • Client: Supplicant (e.g., laptop or phone)

  • Server: Authentication server (e.g., RADIUS)

Whether EAP-PEAP-TLS protocol uses certificates?

  • Yes.

  • Server certificate is mandatory.

  • Client certificate is usually required in EAP-TLS but optional in PEAP-TLS depending on configuration.

How many frame exchanges are seen during connection for EAP-PEAP-TLS protocol?

  • Typically involves 10–20 EAPOL and RADIUS messages.

  • Exact number depends on TLS handshake steps and server configuration.

Whether EAP-PEAP-TLS Protocol uses client certificates?

  • Yes, if configured for mutual authentication.

  • Client certificate is used within the protected TLS tunnel.

Whether EAP-PEAP-TLS Protocol uses Server Certificates?

  • Yes, always.

  • Server certificate is essential to create the initial secure TLS tunnel.

IS EAP-PEAP-TLS Protocol depends on TCP?

  • Indirectly.

  • TLS runs over TCP within the authentication backend (e.g., RADIUS over TCP/TLS in some setups).

IS EAP-PEAP-TLS Protocol depends on UDP?

  • Yes, commonly.

  • RADIUS protocol (carrying EAP) uses UDP 1812 and 1813.

What are the roles involved when testing EAP-PEAP-TLS Protocol?

  • Supplicant (Client)

  • Authenticator (e.g., Access Point or Switch)

  • Authentication Server (e.g., FreeRADIUS)

Does EAP-PEAP-TLS Protocol work with FreeRADIUS server on Linux?

  • Yes, it is fully supported.

  • FreeRADIUS can handle PEAP and TLS-based EAP methods.

Does EAP-PEAP-TLS Protocol work with Internal radius server of hostapd?

  • No.

  • hostapd does not include a full RADIUS server; an external RADIUS server like FreeRADIUS is required.

What is the RFC version use for EAP-PEAP-TLS Protocol?

During Connection Procedure which EAPOL Packets are encrypted?

  • EAPOL packets themselves are not encrypted.

  • The payload inside EAP-PEAP (after TLS tunnel setup) is encrypted using the TLS session.

Can you Explain different stages of Connection Procedure for EAP-PEAP-TLS Protocol?

  • Stage 1: EAPOL Start and Identity exchange.

  • Stage 2: TLS tunnel establishment using server certificate.

  • Stage 3: Client authentication using certificate inside tunnel.

  • Stage 4: Key derivation (MSK generation).

  • Stage 5: Success message and network access granted.

What is the final output of Connection Procedure?

  • Generation of a shared Master Session Key (MSK).

  • Used for encryption in WPA2/WPA3 sessions.

What is the format of the key generated after the connection procedure?

  • The MSK is a 64-byte (512-bit) key.

  • Derived from the TLS handshake process.

Where the use of PMK generated by the Connection Procedure?

  • PMK (Pairwise Master Key) is derived from the MSK.

  • Used by the Authenticator (e.g., Access Point) to generate PTK (Pairwise Transient Key) for secure unicast communication.

  • In this section, you are going to learn

  • Terminology

  • Version Info

  • rfc details

  • Run Free RADIUS

FreeRADIUS: Download latest freeradius source code

Note

  • Make sure internet is available in laptop to download freeradius package

test:~$ wget https://github.com/FreeRADIUS/freeradius-server/archive/v3.0.x.tar.gz

FreeRADIUS: Extract freeradius

test:~$ tar -zvf v3.0.x.tar.gz

FreeRADIUS: Change directory to Radius server

test:~$ cd freeradius-server-3.0/

FreeRADIUS: Check the current working directory using pwd command

Note

  • Make sure your current working directory is freeradius-server-3.0

test:~$ pwd
/home/test/freeradius-server-3.0

FreeRADIUS: Open debian/rules and add this line –without-rml_sql_iodbc above –without-rlm_eap_ikev2

test:~$ vim debian/rules
--without-rml_sql_iodbc \
--without-rlm_eap_ikev2 \

FreeRADIUS: Configure for Compilation

test:~$ ./configure

FreeRADIUS: Build the Radius server

test:~$ make

FreeRADIUS: Go to raddb folder (all radius server/client files and certificates and keys will be generated here)

test:~$ cd /usr/local/etc/raddb

FreeRADIUS: Open clients.conf file and verify localhost client is present else add your own client like below

test:~$ sudo vi clients.conf

client 192.168.56.10{
ipaddr = 192.168.56.10
secret = testing123
}  

FreeRADIUS: Open users file and uncomment below two lines or add

test:~$ sudo vi users

bob 	Cleartext-Password := "testing123"
 	Reply-Message := "Hello, %{User-Name}"

FreeRADIUS: Set default_eap_type=tls in eap file located in /usr/local/etc/raddb/mods-enabled

test:~$ sudo vi /usr/local/etc/raddb/mods-enabled/eap

default_eap_type=peap

FreeRADIUS: Start radius server

test:~$ sudo radiusd -X
  • Run AP mode operation with hostapd

AP : Download hostapd

Note

  • Make sure internet is available in laptop to download hostapd package

test:~$ wget http://w1.fi/releases/hostapd-2.9.tar.gz

AP: Install required packages

test:~$ sudo apt install libnl-genl-3-dev libnl-3-dev libdbus-glib-1-dev

AP : Extract hostapd

test:~$ tar -xzvf hostapd-2.9.tar.gz

AP : Change directory to hostapd

test:~$ cd hostapd-2.9/hostapd/

AP : Check the current working directory using pwd command

Note

  • Make sure your current working directory is hostapd

test:~$ pwd
/home/test/hostapd-2.9/hostapd

AP : Copy the contents of defconfig file to .config file

Note

  • .config file is required for make to start compilation of hostapd

test:~$ sudo cp defconfig .config

AP : Complile hostapd

Note

  • Compile hostapd by running make command

test:~$ make

AP : Check for the binaries created

Note

  • Make sure hostapd and hostapd_cli are present

test:~$ ls
hostapd
hostapd_cli

AP : Create a hostapd.conf file in /etc/hostapd folder with below content

test:~$ sudo vim /etc/hostapd/hostapd.conf

ctrl_interface=/var/run/hostapd
interface=enp0s8
driver=wired
logger_stdout=1
logger_stdout_level=1
debug=2
ieee8021x=1
eap_server=0
eap_user_file=/etc/hostapd/eap_user
eap_reauth_period=3600
use_pae_group_addr=1
auth_algs=1
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=testing123
acct_server_addr=127.0.0.1
acct_server_port=1812
acct_server_shared_secret=testing123
macaddr_acl=0
ca_cert=/usr/local/etc/raddb/certs/ca.pem
server_cert=/usr/local/etc/raddb/certs/server.crt
private_key=/usr/local/etc/raddb/certs/server.p12
private_key_passwd=whatever 

AP : Create a file eap_user in /etc/hostapd/ folder with below content

test:~$ sudo vim /etc/hostapd/eap_user

AP : Run hostapd

test:~$ sudo ./hostapd /etc/hostapd/hostapd.conf
enp0s8: interface state UNINITIALIZED->ENABLED
enp0s8: AP-ENABLED

STA : Download wpa_supplicant

Note

  • Make sure internet is available in laptop to download supplicant package

test:~$ wget https://w1.fi/releases/wpa_supplicant-2.9.tar.gz

STA: Install required packages

test:~$ sudo apt install libnl-genl-3-dev libnl-3-dev libdbus-glib-1-dev

STA : Extract wpa_supplicant

test:~$ tar -xvf wpa_supplicant-2.9.tar.gz

STA : Change directory to wpa_supplicant

test:~$ cd wpa_supplicant-2.9/wpa_supplicant/

STA : Check the current working directory using pwd command

Note

  • Make sure your current working directory is wpa_supplicant

test:~$ pwd
/home/test/wpa_supplicant-2.9/wpa_supplicant

STA : Copy the contents of defconfig file to .config file

Note

  • .config file is required for make to start compilation of supplicant

test:~$ cp defconfig .config

STA : Compile wpa_supplicant

Note

  • Compile supplicant by running make command.

test:~$ make

STA: You might get errors while make regarding openssl headers in that case install the openssl headers and then do make clean and then do make again.

test:~$ sudo apt install libssl-dev
test:~$ make clean
test:~$ make

STA : Check for the binaries created

Note

  • Make sure wpa_supplicant and wpa_cli are present

test:~$ ls
wpa_supplicant
wpa_cli

STA: Copy required certificates from hostapd to wpa_supplicant

STA : Create wpa_supplicant.conf

test:~$ sudo vim wpa_supplicant.conf

ctrl_interface=/run/wpa_supplicant
update_config=1
network={
key_mgmt=WPA-EAP
eap=PEAP
phase2="auth=TLS"
identity="bob"
password="testing123"
ca_cert2="/home/test/ca.pem"
client_cert2="/home/test/client.crt"
private_key2="/home/test/client.p12"
private_key2_passwd="whatever"
}

STA : Run wpa_supplicant

test:~$ sudo ./wpa_supplicant -D wired -i enp0s8 -c wpa_supplicant.conf
enp0s8: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully

STA: Test

test:sudo ./wpa_cli -i enp0s8
> status
  • setup

  • setup

  • packet details

  • usecases

  • features

  • Reference links