summaryrefslogtreecommitdiff
path: root/data/templates/login/pam_radius_auth.conf.tmpl
blob: 56a5e10eee434b1e3d4d38fe106d88e3a8b5aeb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Automatically generated by system-login.py
# RADIUS configuration file

{#   RADIUS IPv6 source address must be specified in [] notation #}
{%   set source_address = namespace()  %}
{%   if radius_source_address is defined and radius_source_address is not none %}
{%     for address in radius_source_address %}
{%       if address | is_ipv4 %}
{%         set source_address.ipv4 = address %}
{%       elif address | is_ipv6 %}
{%         set source_address.ipv6 = "[" + address + "]" %}
{%       endif %}
{%     endfor %}
{%   endif %}
{% if radius_server is defined and radius_server is not none %}
# server[:port]        shared_secret             timeout    source_ip
{% for server in radius_server | sort(attribute='priority') if not server.disabled %}
{#   RADIUS IPv6 servers must be specified in [] notation #}
{%   if server.address | is_ipv4 %}
{{ server.address }}:{{ server.port }} {{ "%-25s" | format(server.key) }} {{ "%-10s" | format(server.timeout) }} {{ source_address.ipv4 if source_address.ipv4 is defined }}
{%   else %}
[{{ server.address }}]:{{ server.port }} {{ "%-25s" | format(server.key) }} {{ "%-10s" | format(server.timeout) }} {{ source_address.ipv6 if source_address.ipv6 is defined }}
{%   endif %}
{% endfor %}

priv-lvl 15
mapped_priv_user radius_priv_user

{% if radius_vrf %}
vrf-name {{ radius_vrf }}
{% endif %}
{% endif %}