博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hostapd作为radius服务器
阅读量:4488 次
发布时间:2019-06-08

本文共 2336 字,大约阅读时间需要 7 分钟。

使用hostapd作为radius服务器,用于企业wifi加密认证。

参考链接:

去网上下载hostapd 源码,本文使用的是hostapd-2.4。操作系统ubuntu16.04。

1,tar -xvzf hostapd-2.4.tar.gz2,cd hostapd-2.4/hostapd3,cp defconfig .config4,open options in .config#CONFIG_DRIVER_NL80211=yCONFIG_DRIVER_NONE=yCONFIG_EAP_SIM=yCONFIG_EAP_AKA=yCONFIG_EAP_AKA_PRIME=yCONFIG_EAP_PAX=yCONFIG_EAP_PSK=yCONFIG_EAP_PWD=yCONFIG_EAP_SAKE=yCONFIG_EAP_GPSK=yCONFIG_EAP_GPSK_SHA256=yCONFIG_EAP_FAST=yCONFIG_RADIUS_SERVER=y5,make6,sudo make install**************if use debian 9, just run "apt install hostapd"7,modify hostapd.confInterface=eno1driver=noneeap_server=1eap_user_file=/etc/hostapd.eap_userca_cert=/usr/local/etc/raddb/certs/cas.pemserver_cert=/usr/local/etc/raddb/certs/server.pemprivate_key=/usr/local/etc/raddb/certs/server.keyprivate_key_passwd=whateverdh_file=/usr/local/etc/raddb/certs/dhpac_opaque_encr_key=000102030405060708090a0b0c0d0e0feap_fast_a_id=101112131415161718191a1b1c1d1e1feap_fast_a_id_info=test servereap_fast_prov=3pac_key_lifetime=604800pac_key_refresh_time=86400radius_server_clients=/etc/hostapd.radius_clientsradius_server_auth_port=1812radius_server_acct_port=1813Interface=eno1,这个需要根据情况进行更改。Ubuntu16.04 中已经不存在eth0,eth1等接口,有线网卡的名称已经更改为eno1。使用ifconfig 命令可以查看有线网卡的设备名称。上面如果没有/usr/local/etc/raddb/certs/目录,需要自己创建这个目录,并把相应的文件放到对应的目录中。可以使用自己的文件放到对应的目录中,我们是买了WFA的证书。或者server.pem, server.key, cas.pem可以复用hostapd文件夹下的同名文件,即拷贝过去配置好相对路径就好。8,sudo cp hostapd.eap_user /etc/9,modify /etc/hostapd.eap_userDelete all default user, add:"testing" FAST,PEAP,TTLS,TLS"testiing1" FAST,PEAP,TTLS,TLS"test" FAST,PEAP,TTLS,TLS"Barney Rubble" FAST,PEAP,TTLS,TLS"testing" MSCHAPV2,GTC,MD5,TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,TTLSMSCHAPV2"password" [2]"test" MSCHAPV2,GTC,MD5,TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,TTLSMSCHAPV2"test" [2]这个文件可以使用hostapd_new_install.zip 压缩包中的同名文件。也可以使用hostapd压缩包中默认的文件。10,sudo cp hostapd.radius_clients /etc/11,modify /etc/hostapd.radius_clientsDelete all default client, add: (secret is test)0.0.0.0/0 test这个“test”是登陆的密码,在设置RADIUS 服务器的时候,share secret 要设置成一样,后面会提到。12, generate dh fileopenssl dhparam -out dh 1024mv dh /usr/local/etc/raddb/certs/13, sudo hostapd -dd hostapd.conf

运行结果

745188-20171213151740410-740574740.png

至此,hostapd作为Radius服务器运行完成。

添加PWD认证方法:

在/etc/hostapd.eap_user,# Phase 1 User下面添加

"testpwd"    PWD    "test"

第一个是ID,第二个是password.

Tony Liu

2017-12-13

转载于:https://www.cnblogs.com/helloworldtoyou/p/8033072.html

你可能感兴趣的文章
【Android进阶】SlidingMenu实现侧滑栏效果的实现
查看>>
discuz是如何判断手机端访问的
查看>>
Sencha Touch 心得
查看>>
安全问题关注博客
查看>>
181101新闻:午后阳光下集思广益,课例研修尝试与挑战并存
查看>>
[Sdoi2013] 直径
查看>>
linux yum命令详解
查看>>
汇编语言笔记10-CALL和RET指令
查看>>
JavaScript不用临时变量交换两个变量的值的七种解决方案
查看>>
插入排序算法--Java实现
查看>>
android软键盘控制
查看>>
自定义LinkedList实现
查看>>
HDU 5306 线段树
查看>>
php输出json 对象{‘code’:200,'data':对象模式}
查看>>
springBean的生命周期
查看>>
【eclipse】启动不了报错java was started but returned exit code=13
查看>>
本地yum源 、阿里yum源、163yum源的配置安装
查看>>
codeforce 604B More Cowbell
查看>>
uvalive 3938 "Ray, Pass me the dishes!" 线段树 区间合并
查看>>
html中事件调用JavaScript函数时有return与没有return的区别
查看>>