summaryrefslogtreecommitdiff
path: root/data/templates/ocserv/radius_conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/ocserv/radius_conf.j2')
-rw-r--r--data/templates/ocserv/radius_conf.j236
1 files changed, 36 insertions, 0 deletions
diff --git a/data/templates/ocserv/radius_conf.j2 b/data/templates/ocserv/radius_conf.j2
new file mode 100644
index 0000000..1ab322f
--- /dev/null
+++ b/data/templates/ocserv/radius_conf.j2
@@ -0,0 +1,36 @@
+### generated by vpn_openconnect.py ###
+nas-identifier VyOS
+
+#### Accounting
+{% if accounting.mode.radius is vyos_defined %}
+{% for acctsrv, srv_conf in accounting.radius.server.items() if 'disable' not in srv_conf %}
+{% if srv_conf.port is vyos_defined %}
+acctserver {{ acctsrv }}:{{ srv_conf.port }}
+{% else %}
+acctserver {{ acctsrv }}
+{% endif %}
+{% endfor %}
+{% endif %}
+
+#### Authentication
+{% if authentication.mode.radius is vyos_defined %}
+{% for authsrv, srv_conf in authentication.radius.server.items() if 'disable' not in srv_conf %}
+{% if srv_conf.port is vyos_defined %}
+authserver {{ authsrv }}:{{ srv_conf.port }}
+{% else %}
+authserver {{ authsrv }}
+{% endif %}
+{% endfor %}
+radius_timeout {{ authentication['radius']['timeout'] }}
+{% if source_address %}
+bindaddr {{ authentication['radius']['source_address'] }}
+{% else %}
+bindaddr *
+{% endif %}
+{% endif %}
+
+servers /run/ocserv/radius_servers
+dictionary /etc/radcli/dictionary
+default_realm
+radius_retries 3
+# \ No newline at end of file