### generated by vpn_openconnect.py ### {% if listen_address is vyos_defined %} listen-host = {{ listen_address }} {% endif %} tcp-port = {{ listen_ports.tcp }} udp-port = {{ listen_ports.udp }} run-as-user = nobody run-as-group = daemon {% if "radius" in authentication.mode %} auth = "radius [config=/run/ocserv/radiusclient.conf{{ ',groupconfig=true' if authentication.radius.groupconfig is vyos_defined else '' }}]" {% if "config_per_x" in authentication %} {% if authentication.config_per_x.disabled is not vyos_defined %} {% if "group" in authentication.config_per_x.mode %} config-per-group = {{ authentication.config_per_x.directory }} default-group-config = {{ authentication.config_per_x.default_config }} {% endif %} {% endif %} {% endif %} {% elif "local" in authentication.mode %} {% if authentication.mode.local == "password-otp" %} auth = "plain[passwd=/run/ocserv/ocpasswd,otp=/run/ocserv/users.oath]" {% elif authentication.mode.local == "otp" %} auth = "plain[otp=/run/ocserv/users.oath]" {% else %} auth = "plain[/run/ocserv/ocpasswd]" {% endif %} {% else %} auth = "plain[/run/ocserv/ocpasswd]" {% endif %} {% if "config_per_x" in authentication %} {% if "user" in authentication.config_per_x.mode %} config-per-user = {{ authentication.config_per_x.directory }} default-user-config = {{ authentication.config_per_x.default_config }} {% endif %} {% endif %} {% if ssl.certificate is vyos_defined %} server-cert = /run/ocserv/cert.pem server-key = /run/ocserv/cert.key {% if ssl.passphrase is vyos_defined %} key-pin = {{ ssl.passphrase }} {% endif %} {% endif %} {% if ssl.ca_certificate is vyos_defined %} ca-cert = /run/ocserv/ca.pem {% endif %} socket-file = /run/ocserv/ocserv.socket occtl-socket-file = /run/ocserv/occtl.socket use-occtl = true isolate-workers = true keepalive = 300 dpd = 60 mobile-dpd = 300 switch-to-tcp-timeout = 30 tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-RSA:-VERS-SSL3.0:-ARCFOUR-128" auth-timeout = 240 idle-timeout = 1200 mobile-idle-timeout = 1800 min-reauth-time = 3 cookie-timeout = 300 rekey-method = ssl try-mtu-discovery = true cisco-client-compat = true dtls-legacy = true max-ban-score = 80 ban-reset-time = 300 # The name to use for the tun device device = sslvpn # DNS settings {% if network_settings.name_server is vyos_defined %} {% for dns in network_settings.name_server %} dns = {{ dns }} {% endfor %} {% endif %} {% if network_settings.tunnel_all_dns is vyos_defined %} {% if "yes" in network_settings.tunnel_all_dns %} tunnel-all-dns = true {% else %} tunnel-all-dns = false {% endif %} {% endif %} # IPv4 network pool {% if network_settings.client_ip_settings.subnet is vyos_defined %} ipv4-network = {{ network_settings.client_ip_settings.subnet }} {% endif %} # IPv6 network pool {% if network_settings.client_ipv6_pool.prefix is vyos_defined %} ipv6-network = {{ network_settings.client_ipv6_pool.prefix }} ipv6-subnet-prefix = {{ network_settings.client_ipv6_pool.mask }} {% endif %} {% if network_settings.push_route is vyos_defined %} {% for route in network_settings.push_route %} route = {{ route }} {% endfor %} {% endif %} {% if network_settings.split_dns is vyos_defined %} {% for tmp in network_settings.split_dns %} split-dns = {{ tmp }} {% endfor %} {% endif %} {% if authentication.group is vyos_defined %} # Group settings {% for grp in authentication.group %} select-group = {{ grp }} {% endfor %} {% endif %}