auth-radius: HTTP authentication via RADIUS protocol
Debian/Ubuntu installation
These docs apply to the APT package nginx-module-auth-radius provided by the GetPageSpeed Extras repository.
- Configure the APT repository as described in APT repository setup.
- Install the module:
sudo apt-get update
sudo apt-get install nginx-module-auth-radius
Warning
This module is not yet published as nginx-module-auth-radius in the APT repositories. Stay tuned, or email [email protected] to request it.
Almost totally rewritten version of https://github.com/lexelby/nginx-radius with
configuration inspired by https://github.com/timchengx/nginx-http-radius-module.
See configuration example at https://gitflic.ru/project/ten0s/nginx-radius.
Build:
- Get nginx source:
$ make getsrc && make src
- Build source:
$ make build_all
- Local run:
$ make run
- Local debug:
$ make gdb
- Configuration:
Sample config file: conf/nginx.conf:
# Main directive to add a Radius server.
## Can be several "radius_server" directives.
radius_server "radius_server_1" {
# Radius server URL
url "127.0.0.1:1812";
# Radius server shared secret
secret "secret";
# NAS identifier, optional
nas_identifier "nas-identifier";
# Timeout for Radius auth requests, optional, default: 5s
auth_timeout 5s;
# Retries count for Radius auth requests, optional, default: 3
auth_retries 3;
# Timeout for Radius health requests, optional, default: 5s
health_timeout 5s;
# Retries count for Radius health requests, optional, default: 1
health_retries 1;
# Radius auth/health requests queue size, optional, default: 10
# Effectively, the number of concurrent requests that can be
# processed without rescheduling.
queue_size 10;
}
## Location directive to select Radius server.
## Can be several "radius_servers" directives per location.
radius_servers "radius_server_1";
## Location directive to enable module and make auth request.
auth_radius "realm" | off;
radius_auth "realm" | off;
## Location directive to enable module and make health request.
radius_health ["user"] ["passwd"];
- Installation (optional):
$ make install