Skip to content
Stuff I'm Up To
Go back

RADIUS Testing

Updated:
Edit page

We have a need to authenticate a couple of devices via our Wifi access points with a RADIUS server. Right now I wanted to test things out using a MAC address authentication process. But for some reason we can’t get it working on the AP’s.

How do I test the RADIUS authentication policies are correct?

I recall using a RADCHECK program in Windows many years ago and figured Linux would probably have something similar. Sure enough a quick search means I can install freeradius-utils which includes radtest and radclient. I needed to pass a number of RADIUS attributes and values with my test call and this is how I did it:

$ cat << EOF | radclient -x [radisuserver] auth [supersecretkey]
User-Name = 6894244B56EB
User-Password = 6894244B56EB
NAS-Port-Type = 19
NAS-Port = 0
Calling-Station-Id = SSID
EOF

This spoofed an auth call to the RADIUS server using the specified MAC address as user name and password and pretended the call was from a NAS-Port-Type of Wireless - 802.1x (19). I got the table of values from here: https://www.juniper.net/documentation/en_US/junos/topics/concept/subscriber-management-nas-port-type-overview.html

Statement OptionNAS-Port-Type ValueDescription
value0–65535Number that indicates either the IANA-assigned value for the RADIUS port type or a custom number-to-port type defined by the user
adsl-cap12Asymmetric DSL, carrierless amplitude phase (CAP) modulation
adsl-dmt13Asymmetric DSL, discrete multitone (DMT)
async0Asynchronous
cable17Cable
ethernet15Ethernet
fddi21Fiber Distributed Data Interface
g3-fax10G.3 Fax
hdlc-clear-channel7HDLC Clear Channel
iapp25Inter-Access Point Protocol (IAPP)
idsl14ISDN DSL
isdn-sync2ISDN Synchronous
isdn-v1104ISDN Async V.110
isdn-v1203ISDN Async V.120
piafs6Personal Handyphone System (PHS) Internet Access Forum Standard
sdsl11Symmetric DSL
sync1Synchronous
token-ring20Token Ring
virtual5Virtual
wireless18Other wireless
wireless-1x-ev24Wireless 1xEV
wireless-cdma200022Wireless code division multiple access (CDMA) 2000
wireless-ieee8021119Wireless 802.11
wireless-umts23Wireless universal mobile telecommunications system (UMTS)
x258X.25
x759X.75
xdsl16DSL of unknown type

Edit page
Share this post:

Previous Post
Java Decompiler
Next Post
Debian Upgrading from an ISO File