PEAP-MSCHAPv2 with Active Directory
Windows, Android and iOS use PEAP-MSCHAPv2 by default when a user types a user name and password for Wi-Fi. This guide makes PEAP-MSCHAPv2 work with Active Directory accounts. At the end, users sign in with their AD credentials and Airgate asks a domain controller to check each password.
How it works
Section titled “How it works”Active Directory never hands out password hashes, so Airgate cannot check an MS-CHAPv2 answer by itself. A computer that is joined to the domain has to ask a domain controller (NTLM pass-through, done with Samba winbind). Airgate offers two such computers:
| Option | When to use it |
|---|---|
| The Airgate appliance joins the domain (Domain join tab of the AD directory) | Airgate runs as the on-premises appliance and can reach the domain controllers. |
| A site connector joins the domain | Airgate runs in the cloud, or the domain controllers are only reachable from a site. |
laptop ──PEAP──▶ AP / controller ──RADIUS──▶ Airgate ──LDAP(S)──▶ DC (user and groups) │ └──▶ domain-joined site connector, if one is online otherwise the appliance's own domain join ──NTLM──▶ DC (MS-CHAPv2 password check)When a domain-joined site connector of the tenant is online, Airgate asks it first. The appliance’s own join answers otherwise.
Before you begin
Section titled “Before you begin”- The AD directory is set up under Access › Directories (Active Directory). Its NetBIOS domain is filled in.
- An AD account that may join computers to the domain (a domain admin, or an account with that right delegated on the target OU). It is used once and not stored.
- From the appliance or site connector to the domain controllers: DNS that finds them (or one DC named in the join), TCP 88 (Kerberos), TCP 389 (LDAP) and TCP 445 (SMB).
- Clocks within five minutes of the domain’s time. On the appliance, set the
same NTP servers as the domain controllers with
sudo airgate-setup. - To join the appliance: a platform administrator in Airgate (only platform administrators see the Domain join tab).
Option A: Join the Airgate appliance to the domain
Section titled “Option A: Join the Airgate appliance to the domain”Step 1: Join
Section titled “Step 1: Join”-
Open Access › Directories and select the AD directory.
-
Open the Domain join tab.
-
Under Join this server to the domain, fill in:
Field Example Notes Realm (AD DNS domain) CONTOSO.COMThe AD DNS domain in capitals. NetBIOS domain CONTOSOThe short domain name. Computer name AIRGATEUp to 15 characters. The computer account created in AD. Domain controller dc1.contoso.comOptional. Empty: found through DNS. OU Servers/NACOptional. Empty: the default Computers container. Join account administratorAn account allowed to join computers. Password Used once for the join, not stored. -
Select Join domain. After a few seconds the tab shows the badge Joined, the realm, the NetBIOS domain, the computer name, the domain controller in use and the Last check time.
Over SSH, sudo airgate-ad-join does the same (it asks the same questions)
and sudo airgate-ad-join test checks the join.
Test re-checks the computer account and the trust with the domain. Leave removes the join; optionally it also deletes the computer account in AD when you enter an account under Also delete the computer account in AD with.
After a restore or rebuild
Section titled “After a restore or rebuild”The domain join is not part of an Airgate backup. After restoring onto a rebuilt appliance, open Domain join and select Join again with the same Computer name. This resets the computer account’s password and PEAP works again.
Option B: Join a site connector to the domain
Section titled “Option B: Join a site connector to the domain”-
In Airgate, open Network › Sites and select Add site. Save the site, then in its drawer select Issue enrollment token and copy the token.
-
Install the site connector at a location that can reach a domain controller.
-
Airgate site connector appliance: sign in over SSH and run
sudo airgate-edge-setup. Answeryto Join Active Directory for AD password checks (PEAP-MSCHAPv2)? and enter:- AD realm (DNS domain, e.g. CORP.EXAMPLE.COM):
CONTOSO.COM - AD NetBIOS domain (e.g. CORP):
CONTOSO - AD account allowed to join computers and its password (used for the join only).
Container image: set these environment variables before the first start:
AD_REALM=CONTOSO.COM,AD_NETBIOS_DOMAIN=CONTOSO, and for the first start onlyAD_JOIN_USERandAD_JOIN_PASSWORD. - AD realm (DNS domain, e.g. CORP.EXAMPLE.COM):
-
The connector joins the domain, starts winbind and shows as online on Network › Sites within a minute. Once its winbind check passes, Airgate sends PEAP password checks for the tenant to it.
Step 2: Allow PEAP in the access policy
Section titled “Step 2: Allow PEAP in the access policy”- Open Access › Access policies and open the policy for the SSID.
- Under Sign-in › Allowed methods, select PEAP.
- Under Check accounts in, make sure the AD directory is listed.
- Select Save changes.
Rules can use the user’s AD groups as before (User is in group).
Step 3: Configure the controller and the devices
Section titled “Step 3: Configure the controller and the devices”- On the wireless controller or AP, set the SSID to WPA2-Enterprise or WPA3-Enterprise with Airgate as the RADIUS server (UDP 1812 and 1813, with the shared secret from Network › Switches and APs).
- Devices check Airgate’s RADIUS server certificate. Its names are on
Certificates › Server certificates › Platform EAP certificate under
Server names (or on the Tenant EAP identity when your tenant has a
dedicated one), and it chains up to the Airgate root CA.
- Managed devices: push the Airgate root CA and the server name in the Wi-Fi profile (MDM or Group Policy).
- Unmanaged devices: the user accepts the server certificate the first time.
Verify
Section titled “Verify”- Sign in to the SSID from a laptop with an AD account.
- In Monitor › Sign-in log, open the entry. The method is PEAP, the matched rule and VLAN are shown.
- Open the Trace tab. It contains a line like
User "alice" found in "Contoso AD": ... response checked by Active Directory.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
Join: failed to lookup DC info or No logon servers |
DNS on the appliance does not find the domain controllers. | Enter a Domain controller (name or IP address) in the join. |
Join: Logon failure |
Wrong join account or password, or the account may not join computers. | Use an account with the join right. |
Join: Clock skew too great |
The appliance’s or the DC’s clock is off by more than five minutes. | Fix NTP with sudo airgate-setup. |
| Badge Trust failing | The computer account was deleted or reset in AD, or port 445 is blocked. | Select Join again; check TCP 445 to the DC. |
Sign-in log reason: no domain-joined edge connector is online and this server is not joined to Active Directory |
Neither option A nor option B is in place. | Join the appliance, or bring a domain-joined site connector online. |
Sign-in log reason: this server is joined to Active Directory but winbind is not running |
The winbind container stopped. | sudo airgate-compose logs winbind, then sudo airgate-compose restart winbind. |
Sign-in log: Wrong password (The attempted logon is invalid ... (0xc000006d)) |
Wrong user name or password. | The user re-enters the password; forget the network to clear a saved one. |
Sign-in log: The referenced account is currently disabled ... (0xc0000072), locked out or password expired |
As the message says, in AD. | Fix the account in AD. |
| Sign-in log: The device used a sign-in method this network doesn’t allow | PEAP is not selected in the policy. | Step 2. |
| PEAP fails, EAP-TTLS/PAP works | No domain join is answering. | Option A or B. |
Logs on the appliance: sudo airgate-compose logs -f winbind (the domain
join) and sudo airgate-compose logs -f freeradius.
Related
Section titled “Related”- Active Directory accounts and groups
- Certificates and trust
- Entra ID (PEAP-MSCHAPv2 is not possible with cloud-only accounts)