(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | === RADIUS > | + | === RADIUS > Settings > Realms/Proxys === |
− | < | + | It is possible to use the imRAD as a proxy RADIUS server. This means that it can consult a remote RADIUS server to validate a user<ref>https://wiki.freeradius.org/config/Proxy</ref>.<br> |
− | + | The RADIUS realm module splits a User-Name attribute into "user" and "realm" portions. If the realm is found, the modules sets the control:Proxy-To-Realm attribute to the realm name. The server will then proxy the packet to the given realm.<ref>https://networkradius.com/doc/3.0.10/raddb/mods-available/realm.html</ref><br> | |
− | + | For example, If a User-Name attribute is received as test@domain.com, "user" is "test" and "realm" is "domain.com". | |
− | + | ||
− | + | Realms point to server pools, and server pools point to home servers. Multiple realms can point to one server pool. One server pool can point to multiple home servers. Each home server can appear in one or more pools. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ==== Home Server Pool ==== | ||
+ | You can define a pool of home servers that is used for fail-over and load-balancing. | ||
+ | * fail-over(default): The request is sent to the first live home server in the list. i.e. If the first home server is marked "dead", the second one is chosen, etc. | ||
+ | * client-balance: The home server is chosen by hashing the source IP address of the packet. If that home server is down, the next one in the list is used, just as with "fail-over". | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ==== Home Server ==== | ||
+ | A Home server is another RADIUS server that gets sent proxied requests and you can define several home servers. | ||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | ! Item !! Required !! Description |
|- | |- | ||
− | | | + | | style='width:150px' | Name || Yes || It is the name of home server to distinguish it from others. The multibyte or Non-ASCII characters(e.g, korean, japaneses) are not allowed. |
|- | |- | ||
− | | | + | | Type || Yes || |
− | * auth | + | Home servers can be sent Access-Request packets or Accounting-Request packets. |
− | * acct: | + | * auth(default): Handles Access-Request packets |
− | * auth+acct: | + | * acct: Handles Accounting-Request packets |
− | + | * auth+acct: andles Access-Request packets at "port", and Accounting-Request packets at "port + 1" | |
|- | |- | ||
− | | | + | |IP Address || Yes || Input a IPv4 address of the home server(e.g. a.b.c.d) |
|- | |- | ||
− | | | + | | Shared Secret || Yes || The shared secret use to "encrypt" and "sign" packets between the NAS and RADIUS. |
+ | The secret can be any ascii string, up to 64 characters in length. | ||
+ | The multibyte or Non-ASCII characters(e.g, korean, japaneses) are not allowed. | ||
|- | |- | ||
− | | | + | | Port || Yes || It is the port to which packets are sent. Usually 1812 for type "auth", and 1813 for type "acct". Older servers may use 1645 and 1646. |
− | |||
|- | |- | ||
− | | | + | | Protocol || Yes || It is The transport protocol and the default is "udp". It may also be "tcp", in which case TCP will be used to talk to this home server. |
|- | |- | ||
− | | | + | | Home Server Pool || Yes || A home server must be joined to a home server pool. ALL home servers in a home server pool have to be of the same type. i.e. they all have to be "auth", or they all have to be "acct", or the all have to be "auth+acct".<ref>For example, the hsp-1 setting is ok but others are not ok. |
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! | + | ! Home server pool !! Home server !! Home server type |
|- | |- | ||
− | | rowspan="2" | hsp-1 | + | | rowspan="2" | hsp-1 (ok) || hs-10 || auth |
|- | |- | ||
| hs-11 || auth | | hs-11 || auth | ||
|- | |- | ||
− | | rowspan="2" | hsp-2 | + | | rowspan="2" | hsp-2 (not ok) || hs-20 || auth |
|- | |- | ||
| hs-21 || acct | | hs-21 || acct | ||
|- | |- | ||
− | | rowspan="2" | hsp-3 | + | | rowspan="2" | hsp-3 (not ok) || hs-30 || auth |
|- | |- | ||
| hs-31 || auth+acct | | hs-31 || auth+acct | ||
Line 79: | Line 58: | ||
|- | |- | ||
|} | |} | ||
+ | ===== Advanced ===== | ||
+ | If the home server does not respond to a request within this time, the server marks the request as timed out. After | ||
+ | "'''response_timeouts'''", the home server is marked as being "zombie", and "'''zombie_period'''" starts. The '''response window''' can be a number between 0.001 and 60.000 Values on the low end are discouraged, as they will likely not work due to limitations of operating system timers.<br> | ||
+ | The default response window is large because responses may be slow, especially when proxying across the Internet. Useful range of values: 5 to 60. | ||
+ | |||
+ | If the "zombie_period" and "'''revive_interval'''" configurations are set smaller, than it is possible for up to 50% of authentications to fail. As a result, we recommend enabling status checks, and we do NOT recommend using "revive_interval". The "revive_interval" is used ONLY if the "'''status_check'''" entry below is "none". Otherwise, it will not be used, and should be deleted. Useful range of values: 10 to 3600. | ||
+ | |||
+ | The proxying server (i.e. this one) can do periodic status checks to see if a dead home server has come back alive. If set to "none", then the other configuration items listed below are not used, and the "revive_interval" time is used instead.<br> | ||
+ | If set to "status-server", the Status-Server packets are sent. Many RADIUS servers support Status-Server. If a server does not support it, please contact the server vendor and request that they add it. With status-server if the home server is marked as a zombie and a status-server response is received, it will be immediately marked as live. | ||
+ | This prevents spurious failovers in federations such as eduroam, where intermediary proxy servers may be functional but the servers of a home institution may not be,<br> | ||
+ | If set to "request", then Access-Request, or Accounting-Request packets are sent, depending on the "type" entry above (auth/acct).<ref>https://github.com/enckse/freeradius/blob/master/proxy.conf</ref> | ||
==== Realms ==== | ==== Realms ==== | ||
− | + | The realm '''DEFAULT''' matches all realms. The realm NULL matches any requests WITHOUT a realm.<br> | |
− | + | If you set the Home server pool to '''LOCAL''', the request will be handled locally as usual, without sending it to a remote radius server. | |
− | |||
− | + | The following examples show how the proxy works.<br> | |
− | + | If a User-Name attribute contains "sales.example.com" realm, the request will be sent to a home server in the hsp-2 home server pool.<br> | |
− | + | If a User-Name attribute contains "tech.example.com" realm, the request will be processed in the local.<br> | |
+ | If a User-Name attribute contains any others realms, the request will be processed in the local.<br> | ||
+ | If a User-Name attribute does not contain realm, the request will be processed in the local. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! realm | + | ! realm !! Home server Pool |
|- | |- | ||
− | | DEFAULT || | + | | DEFAULT || LOCAL |
|- | |- | ||
− | | sales. | + | | sales.example.com || hsp-2 |
|- | |- | ||
− | | tech. | + | | tech.example.com || LOCAL |
|- | |- | ||
|} | |} | ||
− | + | ===== Edit realm ===== | |
− | ===== realm | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! | + | ! style='width:200px' | Item !! Required !! Description |
|- | |- | ||
− | | Realm | + | | Realm || Yes || |
+ | It is the realm. The multibyte or Non-ASCII characters(e.g, korean, japaneses) are not allowed. | ||
+ | The realm can be "DEFAULT". | ||
|- | |- | ||
− | | | + | | Home Server Pool || Yes || Choose on of the home server pools . |
− | |||
|- | |- | ||
− | | Realm | + | | Realm specific NAS-ID || No || If you select a NAS-ID, a request only from the NAS-ID will be proxying. |
|- | |- | ||
− | | nostrip || | + | | nostrip || No || By default the realm is stripped from the username before sending it on to the remote radius server. By specifying the "nostrip" option the @realm suffix will not be stripped.<ref>https://wiki.freeradius.org/config/Proxy</ref> |
− | |||
− | |||
− | |||
|- | |- | ||
− | + | | regex || No || Any regex match is performed in a case-insensitive fashion. If you input a realm as "example.net" and set the regex, the realm will be saving as "~(.*\.)*example\.net$". | |
− | | | + | <br> |
− | | | + | The more regex realms that are defined, the more time it takes to process them. You should define as few regex realms as possible in order to maximize server performance. |
− | |||
− | |||
|- | |- | ||
|} | |} | ||
− | + | ||
− | + | === References === | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 14:39, 16 April 2021
RADIUS > Settings > Realms/Proxys
It is possible to use the imRAD as a proxy RADIUS server. This means that it can consult a remote RADIUS server to validate a user[1].
The RADIUS realm module splits a User-Name attribute into "user" and "realm" portions. If the realm is found, the modules sets the control:Proxy-To-Realm attribute to the realm name. The server will then proxy the packet to the given realm.[2]
For example, If a User-Name attribute is received as test@domain.com, "user" is "test" and "realm" is "domain.com".
Realms point to server pools, and server pools point to home servers. Multiple realms can point to one server pool. One server pool can point to multiple home servers. Each home server can appear in one or more pools.
Home Server Pool
You can define a pool of home servers that is used for fail-over and load-balancing.
- fail-over(default): The request is sent to the first live home server in the list. i.e. If the first home server is marked "dead", the second one is chosen, etc.
- client-balance: The home server is chosen by hashing the source IP address of the packet. If that home server is down, the next one in the list is used, just as with "fail-over".
Home Server
A Home server is another RADIUS server that gets sent proxied requests and you can define several home servers.
Item | Required | Description |
---|---|---|
Name | Yes | It is the name of home server to distinguish it from others. The multibyte or Non-ASCII characters(e.g, korean, japaneses) are not allowed. |
Type | Yes |
Home servers can be sent Access-Request packets or Accounting-Request packets.
|
IP Address | Yes | Input a IPv4 address of the home server(e.g. a.b.c.d) |
Shared Secret | Yes | The shared secret use to "encrypt" and "sign" packets between the NAS and RADIUS.
The secret can be any ascii string, up to 64 characters in length. The multibyte or Non-ASCII characters(e.g, korean, japaneses) are not allowed. |
Port | Yes | It is the port to which packets are sent. Usually 1812 for type "auth", and 1813 for type "acct". Older servers may use 1645 and 1646. |
Protocol | Yes | It is The transport protocol and the default is "udp". It may also be "tcp", in which case TCP will be used to talk to this home server. |
Home Server Pool | Yes | A home server must be joined to a home server pool. ALL home servers in a home server pool have to be of the same type. i.e. they all have to be "auth", or they all have to be "acct", or the all have to be "auth+acct".[3] |
Advanced
If the home server does not respond to a request within this time, the server marks the request as timed out. After
"response_timeouts", the home server is marked as being "zombie", and "zombie_period" starts. The response window can be a number between 0.001 and 60.000 Values on the low end are discouraged, as they will likely not work due to limitations of operating system timers.
The default response window is large because responses may be slow, especially when proxying across the Internet. Useful range of values: 5 to 60.
If the "zombie_period" and "revive_interval" configurations are set smaller, than it is possible for up to 50% of authentications to fail. As a result, we recommend enabling status checks, and we do NOT recommend using "revive_interval". The "revive_interval" is used ONLY if the "status_check" entry below is "none". Otherwise, it will not be used, and should be deleted. Useful range of values: 10 to 3600.
The proxying server (i.e. this one) can do periodic status checks to see if a dead home server has come back alive. If set to "none", then the other configuration items listed below are not used, and the "revive_interval" time is used instead.
If set to "status-server", the Status-Server packets are sent. Many RADIUS servers support Status-Server. If a server does not support it, please contact the server vendor and request that they add it. With status-server if the home server is marked as a zombie and a status-server response is received, it will be immediately marked as live.
This prevents spurious failovers in federations such as eduroam, where intermediary proxy servers may be functional but the servers of a home institution may not be,
If set to "request", then Access-Request, or Accounting-Request packets are sent, depending on the "type" entry above (auth/acct).[4]
Realms
The realm DEFAULT matches all realms. The realm NULL matches any requests WITHOUT a realm.
If you set the Home server pool to LOCAL, the request will be handled locally as usual, without sending it to a remote radius server.
The following examples show how the proxy works.
If a User-Name attribute contains "sales.example.com" realm, the request will be sent to a home server in the hsp-2 home server pool.
If a User-Name attribute contains "tech.example.com" realm, the request will be processed in the local.
If a User-Name attribute contains any others realms, the request will be processed in the local.
If a User-Name attribute does not contain realm, the request will be processed in the local.
realm | Home server Pool |
---|---|
DEFAULT | LOCAL |
sales.example.com | hsp-2 |
tech.example.com | LOCAL |
Edit realm
Item | Required | Description |
---|---|---|
Realm | Yes |
It is the realm. The multibyte or Non-ASCII characters(e.g, korean, japaneses) are not allowed. The realm can be "DEFAULT". |
Home Server Pool | Yes | Choose on of the home server pools . |
Realm specific NAS-ID | No | If you select a NAS-ID, a request only from the NAS-ID will be proxying. |
nostrip | No | By default the realm is stripped from the username before sending it on to the remote radius server. By specifying the "nostrip" option the @realm suffix will not be stripped.[5] |
regex | No | Any regex match is performed in a case-insensitive fashion. If you input a realm as "example.net" and set the regex, the realm will be saving as "~(.*\.)*example\.net$".
|
References
- ↑ https://wiki.freeradius.org/config/Proxy
- ↑ https://networkradius.com/doc/3.0.10/raddb/mods-available/realm.html
- ↑ For example, the hsp-1 setting is ok but others are not ok.
Home server pool Home server Home server type hsp-1 (ok) hs-10 auth hs-11 auth hsp-2 (not ok) hs-20 auth hs-21 acct hsp-3 (not ok) hs-30 auth hs-31 auth+acct - ↑ https://github.com/enckse/freeradius/blob/master/proxy.conf
- ↑ https://wiki.freeradius.org/config/Proxy