This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| radius_on_centos7 [2015/06/24 14:07] – herwarth | radius_on_centos7 [2018/02/26 21:36] (current) – [Update to CentOS 7.4] herwarth | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======FreeRadius on CentOS 7 with LDAP support====== | ======FreeRadius on CentOS 7 with LDAP support====== | ||
| + | =====Prerequisite===== | ||
| + | * Download the WPA test script: {{: | ||
| =====Installation====== | =====Installation====== | ||
| yum install freeradius-ldap freeradius-utils freeradius | yum install freeradius-ldap freeradius-utils freeradius | ||
| Line 7: | Line 9: | ||
| =====Configuration===== | =====Configuration===== | ||
| + | ====LDAP==== | ||
| vi ldap | vi ldap | ||
| Line 22: | Line 24: | ||
| control: | control: | ||
| control: | control: | ||
| + | reply: | ||
| + | reply: | ||
| + | reply: | ||
| + | reply: | ||
| } | } | ||
| user { | user { | ||
| Line 28: | Line 34: | ||
| } | } | ||
| } | } | ||
| - | | + | </ |
| + | ====Clients==== | ||
| + | vi / | ||
| + | |||
| + | < | ||
| + | client private-network-1 { | ||
| + | ipaddr = 172.16.0.0/ | ||
| + | secret = testing123 | ||
| + | } | ||
| + | client private-network-1-ipv6 { | ||
| + | ipv6addr | ||
| + | secret | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ====TLS==== | ||
| + | In this situation I already have a CA and a certificate created on the CA for this machine. So I move the old directory and create a new one! | ||
| + | cd / | ||
| + | mv certs certs.org | ||
| + | mkdir certs | ||
| + | chown root: | ||
| + | chmod 770 certs | ||
| + | Now let's copy the necessary files. | ||
| + | * the certificate and private key must be concatenated in server.pem | ||
| + | * the CA certificate must have the name ca.pem | ||
| + | * copy the dh file from the original certs directory | ||
| + | * set the correct permissions | ||
| + | Result: | ||
| + | cd / | ||
| + | ls -l | ||
| + | < | ||
| + | total 16 | ||
| + | -rw-r-----. 1 root radiusd 1375 Jun 24 16:24 ca.pem | ||
| + | -rw-r-----. 1 root radiusd | ||
| + | -rw-r-----. 1 root radiusd 6297 Jun 24 16:24 server.pem | ||
| + | </ | ||
| + | systemctl enable radiusd | ||
| + | systemctl start radiusd | ||
| + | =====Firewall===== | ||
| + | firewall-cmd --permanent --zone=management --add-service=radius | ||
| + | firewall-cmd --permanent --zone=local --add-service=radius | ||
| + | firewall-cmd --reload | ||
| + | =====Testing===== | ||
| + | Query user for normal access: | ||
| + | radtest < | ||
| + | Query user for WPA enterprise: | ||
| + | ./ | ||
| + | ./ | ||
| + | =====Update to CentOS 7.4===== | ||
| + | The upgrade to CentOS 7.4 breaks FreeRadius with LDAP. I discovered some errors with dots (.) in the username. So I altered the filter file in / | ||
| + | THIS CODE IS OBSOLETE | ||
| + | <code - / | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | # if (& | ||
| + | # | ||
| + | # & | ||
| + | # } | ||
| + | # | ||
| + | # } | ||
| + | . | ||
| + | . | ||
| + | # if (& | ||
| + | # | ||
| + | # & | ||
| + | # } | ||
| + | # | ||
| + | # } | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | </ | ||
| + | ===== Peap config change for radius assigned VLAN ==== | ||
| + | <code - / | ||
| + | . | ||
| + | . | ||
| + | peap { | ||
| + | . | ||
| + | . | ||
| + | use_tunneled_reply = yes | ||
| + | . | ||
| + | . | ||
| + | </ | ||
| {{tag> | {{tag> | ||