ossh portal strongswan openswan freeradius討論QQ羣:892427461
ossh+freeradius+daloradius+ad實現wlan+portal+域賬戶認證二
第二部分 centos7安裝配置freeradius
試驗時間:2019年2月20日
拓撲圖
環境:
AC: AC6005: IP地址:10.100.0.50
AP: AP6310
服務器:
域控服務器:
Windows Server2019
IP地址:10.99.101.207 域名:dc.test.com
ossh服務器:
Centos7
IP地址:10.99.101.206
freeradius服務器:
Centos7
IP地址:10.99.101.205
客戶端:Windows10 ltsc
安卓9.0
第二部分 centos7安裝配置freeradius
試驗時間:2019年2月20日
1、 CentOS 7 最小安裝,隨意,其他也可以。
設置IP地址
cd /etc/sysconfig/networks-scripts vi ifcfg-eno16777736
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.99.101.205
NETMASK=255.255.255.0
GATEWAY=10.99.101.1
DNS1=192.168.7.1
systemctl restart network
2、 關閉selinux
vi /etc/sysconfig/selinux
SELINUX=disabled
reboot
sestatus
SELinux status: disabled
*******************************
安裝freeradius
yum install -y freeradius freeradius-ldap freeradius-utils
打開防火牆端口
firewall-cmd --add-port=1812/udp --permanent
firewall-cmd --add-port=1813/udp --permanent
firewall-cmd --reload
開機啓動服務
systemctl enable radiusd
systemctl start radiusd
開啓測試模式
systemctl stop radiusd
radiusd -Xx
vi /etc/raddb/mods-available/ldap
ldap { server = '10.99.101.207' port = 389 identity = 'cn=administrator,cn=users,dc=test,dc=com' password = ******** base_dn = 'dc=test,dc=com' ... ... user{ ... ... filter = "(samaccountname=%{%{Stripped-User-Name}:-%{User-Name}})" # filter = "(uid=%{%{Stripped-User-Name}:-%{User-Name}})" ... ... } }
vi /etc/raddb/sites-enabled/default
authorize {
if (&User-Password) {
# If !State and User-Password (PAP), then force LDAP:
update control {
Auth-Type := LDAP
}
}
... ...
}
authenticate{
... ...
Auth-Type PAP {
ldap
}
... ...
Auth-Type LDAP {
ldap
}
... ...
}
ln -s /etc/raddb/mods-available/ldap /etc/raddb/mods-enabled/ldap
4、編輯配置
添加ac6005爲客戶端
vi /etc/raddb/clients.conf
client ac6005{
ipaddr =10.100.0.50
secret = testing123
require_message_authenticator = no
}
開啓測試模式
systemctl stop radiusd
radiusd -Xx
另開一個終端
radtest 域賬戶 域賬戶密碼 127.0.0.1 0 testing123
Received Access-Accept Id 35 from 127.0.0.1 to 0.0.0.0:0 legth 20
安裝成功