### 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 %} {% if snmp.master_agent is vyos_defined %} [snmp] master=1 {% endif %} [client-ip-range] disable {# 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' %} {% if wins_server is vyos_defined %} [wins] {% for server in wins_server %} wins{{ loop.index }}={{ server }} {% endfor %} {% endif %} {# Common chap-secrets and RADIUS server/option definitions #} {% include 'accel-ppp/config_chap_secrets_radius.j2' %} [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 %} {# Common ppp-options definitions #} {% include 'accel-ppp/ppp-options.j2' %} [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 pado_delay_param = namespace(value='0') %} {% for delay in pado_delay | sort(attribute='0') %} {% if not loop.last %} {% set pado_delay_param.value = pado_delay_param.value + ',' + delay + ':' + pado_delay[delay].sessions %} {% else %} {% set pado_delay_param.value = pado_delay_param.value + ',-1:' + pado_delay[delay].sessions %} {% 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 %} {% if limits is vyos_defined %} [connlimit] {% if limits.connection_limit is vyos_defined %} limit={{ limits.connection_limit }} {% endif %} {% if limits.burst is vyos_defined %} burst={{ limits.burst }} {% endif %} {% if limits.timeout is vyos_defined %} timeout={{ limits.timeout }} {% endif %} {% endif %} {# Common RADIUS shaper configuration #} {% include 'accel-ppp/config_shaper_radius.j2' %} {% if extended_scripts is vyos_defined %} [pppd-compat] verbose=1 radattr-prefix=/run/accel-pppd/radattr {% set script_name = {'on_up': 'ip-up', 'on_down': 'ip-down', 'on_change':'ip-change', 'on_pre_up':'ip-pre-up'} %} {% for script in extended_scripts %} {{ script_name[script] }}={{ extended_scripts[script] }} {% endfor %} {% endif %} [cli] tcp=127.0.0.1:2001