summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp/pppoe.config.j2
blob: 42bc8440c9970bb7ecfc20729013681abbcfe8fa (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
### generated by accel_pppoe.py ###
[modules]
log_syslog
pppoe
shaper
{# Common authentication backend definitions #}
{% include 'accel-ppp/config_modules_auth_mode.j2' %}
ippool
{# Common IPv6 definitions #}
{% include 'accel-ppp/config_modules_ipv6.j2' %}
{# Common authentication protocols (pap, chap ...) #}
{% include 'accel-ppp/config_modules_auth_protocols.j2' %}
{% if snmp is vyos_defined %}
net-snmp
{% endif %}
{% if limits is vyos_defined %}
connlimit
{% endif %}
{% if extended_scripts is vyos_defined %}
sigchld
pppd_compat
{% endif %}

[core]
thread-count={{ thread_count }}

[log]
syslog=accel-pppoe,daemon
copy=1
level=5

{% if authentication.mode is vyos_defined("noauth") %}
[auth]
noauth=1
{% endif %}

[client-ip-range]
0.0.0.0/0

[common]
{% if session_control is vyos_defined and session_control is not vyos_defined('disable') %}
single-session={{ session_control }}
{% endif %}
{% if max_concurrent_sessions is vyos_defined %}
max-starting={{ max_concurrent_sessions }}
{% endif %}

[pppoe]
verbose=1
ac-name={{ access_concentrator }}
{% if interface is vyos_defined %}
{%     for iface, iface_config in interface.items() %}
{%         if iface_config.vlan is not vyos_defined %}
interface={{ iface }}
{%         else %}
{%             for vlan in iface_config.vlan %}
interface=re:^{{ iface }}\.{{ vlan | range_to_regex }}$
{%             endfor %}
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
{%         endif %}
{%     endfor %}
{% endif %}
{% if service_name %}
service-name={{ service_name | join(',') }}
{% endif %}
{% if pado_delay %}
{%     set delay_without_sessions = pado_delay.delays_without_sessions[0] | default('0') %}
{%     set pado_delay_param = namespace(value=delay_without_sessions) %}
{%     for delay, sessions in pado_delay.delays_with_sessions | sort(attribute='1') %}
{%         if not delay == 'disable' %}
{%             set pado_delay_param.value = pado_delay_param.value + ',' + delay + ':' + sessions | string %}
{%         else %}
{%             set pado_delay_param.value = pado_delay_param.value + ',-1:' + sessions | string %}
{%         endif %}
{%     endfor %}
pado-delay={{ pado_delay_param.value }}
{% endif %}
{% if authentication.radius.called_sid_format is vyos_defined %}
called-sid={{ authentication.radius.called_sid_format }}
{% endif %}
{% if authentication.mode is vyos_defined("noauth") %}
noauth=1
{% endif %}
{% if default_pool is vyos_defined %}
ip-pool={{ default_pool }}
{% endif %}
{% if default_ipv6_pool is vyos_defined %}
ipv6-pool={{ default_ipv6_pool }}
ipv6-pool-delegate={{ default_ipv6_pool }}
{% endif %}

{# Common IP pool definitions #}
{% include 'accel-ppp/config_ip_pool.j2' %}

{# Common IPv6 pool definitions #}
{% include 'accel-ppp/config_ipv6_pool.j2' %}

{# Common DNS name-server definition #}
{% include 'accel-ppp/config_name_server.j2' %}

{# Common wins-server definition #}
{% include 'accel-ppp/config_wins_server.j2' %}

{# Common chap-secrets and RADIUS server/option definitions #}
{% include 'accel-ppp/config_chap_secrets_radius.j2' %}

{# Common ppp-options definitions #}
{% include 'accel-ppp/ppp-options.j2' %}

{# Common RADIUS shaper configuration #}
{% include 'accel-ppp/config_shaper_radius.j2' %}

{# Common Extended scripts configuration #}
{% include 'accel-ppp/config_extended_scripts.j2' %}

{# Common Limits configuration #}
{% include 'accel-ppp/config_limits.j2' %}

{# Common SNMP definitions #}
{% include 'accel-ppp/config_snmp.j2' %}

[cli]
tcp=127.0.0.1:2001