ops.conf.tmpl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # FFHO OPS VPN
  3. #
  4. proto {{ config['proto'] }}
  5. port {{ config['port'] }}
  6. {%- if "bind-dev" in config %}
  7. bind-dev {{ config['bind-dev'] }}
  8. {% endif %}
  9. tls-server
  10. dev-type tun
  11. dev tun-ops
  12. tun-mtu 1400
  13. ca /etc/ssl/certs/ffho-cacert.pem
  14. cert /etc/ssl/certs/{{ config['fqdn'] }}.cert.pem
  15. key /etc/ssl/private/{{ config['fqdn'] }}.key.pem
  16. dh /etc/ssl/dhparam.pem
  17. # Auth via LDAP
  18. plugin /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so openvpn
  19. verify-client-cert none
  20. username-as-common-name
  21. # Server mode and client subnets
  22. server {{ config['servers'][grains.id]['prefix_v4'] }}
  23. server-ipv6 {{ config['servers'][grains.id]['prefix_v6'] }}
  24. topology subnet
  25. # Push route for aggregates
  26. {%- for prefix in config['routes'] %}
  27. {%- set kw = 'route-ipv6' if ':' in prefix else 'route' %}
  28. push "{{ kw }} {{ prefix }}"
  29. {%- endfor %}
  30. # push "dhcp-option DNS 10.132.251.53"
  31. persist-key
  32. persist-tun
  33. keepalive 10 120
  34. data-ciphers {{ config.get ('data-ciphers', 'AES-256-GCM:AES-128-GCM') }}
  35. data-ciphers-fallback {{ config.get ('data-ciphers-fallback', 'AES-256-CBC') }}
  36. # Log a short status
  37. status /var/log/openvpn/openvpn-status-ops.log
  38. verb 1