| | 1 | = Radius-Server auf der paedml = |
| | 2 | |
| | 3 | [https://wiki.linuxmuster.net/community/anwenderwiki:freeradius?s%5B%5D=freeradius Hintergrundinformation bei linuxmuster.net] |
| | 4 | |
| | 5 | == benötigte Pakete == |
| | 6 | * freeradius |
| | 7 | * freeradius-common |
| | 8 | * freeradius-ldap |
| | 9 | * libfreeradius2 |
| | 10 | * freeradius-utils [zum Testen] |
| | 11 | |
| | 12 | == weitere Schritte == |
| | 13 | * eventuell Test durchführen von localhost |
| | 14 | * /etc/freeradius/clients.conf |
| | 15 | {{{ |
| | 16 | client 10.1.0.0/16 { |
| | 17 | secret = "Hier das Zugriffs-Secret angeben / wird vom UnifiManager benötigt" |
| | 18 | shortname = Unifi_Management |
| | 19 | } |
| | 20 | }}} |
| | 21 | * damit ist nun auch ein radtest von der VM unifi möglich: |
| | 22 | {{{ |
| | 23 | radtest steve testing 10.1.0.X:1812 10 "Zugriffs-Secret von Oben" |
| | 24 | }}} |
| | 25 | * /etc/freeradius/module/ldap |
| | 26 | {{{ |
| | 27 | ldap { |
| | 28 | (...) |
| | 29 | server = "localhost" |
| | 30 | identity = "cn=admin,dc=kg-fds,dc=de" # Oder entsprechend (siehe /etc/ldap/slapd.conf) |
| | 31 | password = "PW aus Datei /etc/ldap/slapd.conf" |
| | 32 | basedn = "ou=accounts,dc=kg-fds,dc=de" # Oder entsprechend |
| | 33 | filter = "(uid=%{Stripped-User-Name:-%{User-Name}})" |
| | 34 | base_filter = "(objectclass=posixAccount)" |
| | 35 | groupname_attribute = cn |
| | 36 | groupmembership_filter = (&(objectClass=posixGroup)(memberUid=%u)) |
| | 37 | groupmembership_attribute = radiusGroupName |
| | 38 | (...) |
| | 39 | } |
| | 40 | }}} |
| | 41 | |
| | 42 | * /etc/freeradius/sites-available/default |
| | 43 | {{{ |
| | 44 | authorize { |
| | 45 | (...) |
| | 46 | # |
| | 47 | # The ldap module will set Auth-Type to LDAP if it has not |
| | 48 | # already been set |
| | 49 | ldap |
| | 50 | (...) |
| | 51 | } |
| | 52 | |
| | 53 | |
| | 54 | authenticate { |
| | 55 | (...) |
| | 56 | # Uncomment it if you want to use ldap for authentication |
| | 57 | # |
| | 58 | # Note that this means "check plain-text password against |
| | 59 | # the ldap database", which means that EAP won't work, |
| | 60 | # as it does not supply a plain-text password. |
| | 61 | Auth-Type LDAP { |
| | 62 | ldap |
| | 63 | } |
| | 64 | (...) |
| | 65 | } |
| | 66 | |
| | 67 | }}} |
| | 68 | |
| | 69 | * /etc/freeradius/sites-available/inner-tunnel |
| | 70 | {{{ |
| | 71 | server inner-tunnel { |
| | 72 | |
| | 73 | authorize { |
| | 74 | (...) |
| | 75 | ldap |
| | 76 | (...) |
| | 77 | } |
| | 78 | |
| | 79 | |
| | 80 | authenticate { |
| | 81 | (...) |
| | 82 | Auth-Type LDAP { |
| | 83 | ldap |
| | 84 | } |
| | 85 | (...) |
| | 86 | } |
| | 87 | |
| | 88 | } |
| | 89 | }}} |
| | 90 | |
| | 91 | |
| | 92 | * /etc/freeradius/eap.conf |
| | 93 | {{{ |
| | 94 | eap { |
| | 95 | (...) |
| | 96 | default_eap_type = peap |
| | 97 | (...) |
| | 98 | ttls { |
| | 99 | default_eap_type = mschapv2 |
| | 100 | } |
| | 101 | (...) |
| | 102 | peap { |
| | 103 | (...) |
| | 104 | default_eap_type = mschapv2 |
| | 105 | } |
| | 106 | } |
| | 107 | (...) |
| | 108 | }}} |
| | 109 | * /etc/freeradius/modules/pap |
| | 110 | {{{ |
| | 111 | (...) |
| | 112 | auto_header = yes |
| | 113 | (...) |
| | 114 | }}} |
| | 115 | |
| | 116 | * /etc/freeradius/user |
| | 117 | {{{ |
| | 118 | DEFAULT Ldap-Group == "cn=p_wifi,ou=groups,dc=kg-fds,dc=de" # Oder entsprechend |
| | 119 | DEFAULT Auth-Type := Reject |
| | 120 | Reply-Message = "Your are not allowed to access the WLAN!" |
| | 121 | |
| | 122 | }}} |
| | 123 | |
| | 124 | * Radtest mit EAP von localhost: |
| | 125 | {{{ |
| | 126 | radtest -t eap-md5 steve testing localhost 10 testing123 |
| | 127 | }}} |
| | 128 | * Radtest mit gültigem User und EAP von localhost: |
| | 129 | {{{ |
| | 130 | radtest -t eap-md5 user password localhost 10 testing123 |
| | 131 | }}} |