summaryrefslogtreecommitdiff
path: root/data/templates/l2tp/chap-secrets.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-05 16:40:32 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-05 16:40:32 +0200
commitcce97b21745987f88228cf0ea8c147243f3aec4f (patch)
treeaf29c198137cd86edeae3ac74bbcd8f03dabdfce /data/templates/l2tp/chap-secrets.tmpl
parentc4133d2807be907f1508d8690696101649020065 (diff)
downloadvyos-1x-cce97b21745987f88228cf0ea8c147243f3aec4f.tar.gz
vyos-1x-cce97b21745987f88228cf0ea8c147243f3aec4f.zip
l2tp: T2230: move inlined templates to dedicated files
Diffstat (limited to 'data/templates/l2tp/chap-secrets.tmpl')
-rw-r--r--data/templates/l2tp/chap-secrets.tmpl11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/templates/l2tp/chap-secrets.tmpl b/data/templates/l2tp/chap-secrets.tmpl
new file mode 100644
index 000000000..ee47a583e
--- /dev/null
+++ b/data/templates/l2tp/chap-secrets.tmpl
@@ -0,0 +1,11 @@
+# username server password acceptable local IP addresses shaper
+{% for user in authentication['local-users'] %}
+{% if authentication['local-users'][user]['state'] == 'enabled' %}
+{% if (authentication['local-users'][user]['upload']) and (authentication['local-users'][user]['download']) %}
+{{user}}\t*\t{{authentication['local-users'][user]['passwd']}}\t{{authentication['local-users'][user]['ip']}}\t\
+{{authentication['local-users'][user]['download']}}/{{authentication['local-users'][user]['upload']}}
+{% else %}
+{{user}}\t*\t{{authentication['local-users'][user]['passwd']}}\t{{authentication['local-users'][user]['ip']}}
+{% endif %}
+{% endif %}
+{% endfor %}