eap-md5

eap-md5
     
文件路径
用途 示例 备注
#gedit /usr/local/etc/raddb/sites-available/default
#gedit /usr/local/etc/raddb/sites-enabled/default
选择账户数据库
设置authorize{} 中files为隐性,sql为显性

选择从sql数据库读取用户预设信息
 
#gedit /usr/local/etc/raddb/sites-available/default
#gedit /usr/local/etc/raddb/sites-enabled/default
选择认证方式
设置authorize{} 中eap设为显性

选择认证方式为eap
 
#gedit /usr/local/etc/raddb/eap.conf
选择eap类型
设置eap{} 中default_eap_type=md5
设置eap类型为md5
 
#mysql -u root -p
Enter password:456456
mysql> use freeradius;
mysql> insert into radgroupreply (groupname,attribute,op,value) values ('eap','Auth-Type',':=','EAP');
mysql> insert into radgroupreply (groupname,attribute,op,value) values ('eap','Service-Type',':=','Framed-User');
mysql> insert into radgroupreply (groupname,attribute,op,value) values ('eap','Framed-IP-Address',':=','255.255.255.255');
mysql> insert into radgroupreply (groupname,attribute,op,value) values ('eap','Framed-IP-Netmask',':=','255.255.255.0');
 建立组信息    
mysql> insert into radcheck (username,attribute,op,value) values ('eap','User-Password',':=','eap');
 建立用户信息    
mysql> insert into radusergroup (username,groupname) values ('eap','eap');

关联用户与组

   
mysql> insert  into radreply(username,attribute,op,value) values('eap','Reply-Message','=','eap OK!');

添加用户回复信息

   
#gedit /usr/local/etc/raddb/clients.conf
添加新的代理主机
在最后面添加
client 10.10.200.0/24 {
secret = 111111  
shortname = tessie
} localhost的secret默认为testing123
 
#radiusd -X
#(echo "User-Name = \"eap\""; echo "Cleartext-Password = \"eap\""; echo "EAP-Code = \"Response\""; echo "EAP-Id = 210"; echo "EAP-Type-Identity = \"eap\""; echo "Message-Authenticator = 0x00";) | radeapclient -x localhost auth testing123
 测试
radeapclient [options] server [:port] <command> [<secret>]
上一篇:黑客攻击常用CMD命令大全


下一篇:JSON 学习总结 <一>:什么是JSON