how to setup external FreeRADIUS working with openwrt to support WPA Enterprise

how to setup external FreeRADIUS working with openwrt to support WPA Enterprise

FreeRADIUS Server setup on Ubuntu (Server IP: 192.168.254.102)

  1. install FreeRADIUS

sudo apt-get install freeradius

  1. stop service first, as we will config it later

sudo service freeradius stop

  1. enable one test account in config file

sudo vi /etc/freeradius/usrs

  1. steve Cleartext-Password := "testing" 
  2. Service-Type = Framed-User, 
  3. Framed-Protocol = PPP, 
  4. Framed-IP-Address = 172.16.3.33, 
  5. Framed-IP-Netmask = 255.255.255.0, 
  6. Framed-Routing = Broadcast-Listen, 
  7. Framed-Filter-Id = "std.ppp", 
  8. Framed-MTU = 1500, 
  9. Framed-Compression = Van-Jacobsen-TCP-IP 
  1. test locally

radtest steve testing localhost 1812 testing123

success log looks like:

  1. Sending Access-Accept of id 23 to 172.16.13.159 port 49537 
  2. MS-MPPE-Recv-Key = 0x3155da8bc5cd91dffff4cfd281c87df965cee670043ac38b7ba7f3fef183c7f4 
  3. MS-MPPE-Send-Key = 0x67c5784f5280277e3b6c2344751d2d67ebc456699dae60191945f1ce2f488b14 
  4. EAP-Message = 0x03e90004 
  5. Message-Authenticator = 0x00000000000000000000000000000000 
  6. User-Name = "steve" 
  7. Finished request 23. 
  8.  
  1. add AP IP into clients, make sure AP can communicate with this FreeRADIUS server

sudo vi /etc/freeradius/clients

  1. client localhost { 
  2. # Allowed values are: 
  3. # dotted quad (1.2.3.4) 
  4. # hostname (radius.example.com) 
  5. # AP's IP 
  6. ipaddr = 172.16.13.159 
  7.  
  1. run freeradius in debugging mode

sudo freeradius -X

AP Settings on OpenWRT (AP IP: 172.16.13.159)

  1. setup the WPA2 encryption on specific ssid

uci set wireless.ath50.encryption='wpa2’
uci set wireless.ath50.server=‘192.168.254.102’ # here is FreeRADIUS server ip
uci set wireless.ath50.key='testing123’
uci commit wireless

  1. restart wifi service

wifi down && wifi up

Client Connection Testing

  1. connect this specific ssid, and input username and password: steve/testing

input

input

  1. accept the certs from FreeRADIUS server

certs

certs

  1. connect successfully

nicephil@gmail.com 2017-6-20

posted on 2017-06-20 15:55  nicephil  阅读(1106)  评论(0编辑  收藏  举报

导航