l2tp_broker.cfg.j2 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [broker]
  2. ; IP address the broker will listen and accept tunnels on
  3. address={{ansible_eth0.ipv4.address}}
  4. ; Ports where the broker will listen on
  5. {% if tunneldigger.instance_per_domain == True %}
  6. port={{20000 + (item.key | int)}}
  7. {% else %}
  8. {% set ports = [] %}
  9. {% for domaene in domaenenliste|dictsort %}
  10. {% if ports.append(20000 + (domaene[0] | int )) %}{% endif %}
  11. {% endfor %}
  12. port={{ports|join(',')}}
  13. {% endif %}
  14. ; Interface with that IP address
  15. interface={{tunneldigger.interface}}
  16. ; Maximum number of tunnels that will be allowed by the broker
  17. max_tunnels={{tunneldigger.max_tunnels}}
  18. ; Tunnel port base
  19. port_base={{tunneldigger.port_base}}
  20. ; Tunnel id base
  21. {% if tunneldigger.instance_per_domain == True %}
  22. tunnel_id_base={{100 + (item.key | int)}}
  23. {% else %}
  24. tunnel_id_base=100
  25. {% endif %}
  26. ; Namespace (for running multiple brokers); note that you must also
  27. ; configure disjunct ports, and tunnel identifiers in order for
  28. ; namespacing to work
  29. {% if tunneldigger.instance_per_domain == True %}
  30. namespace=domaene_{{item.key}}
  31. {% else %}
  32. namespace=default
  33. {% endif %}
  34. ; check if all kernel module are loaded. Do not check for built-ins.
  35. check_modules=true
  36. ;
  37. max_cookies=100
  38. ;
  39. pmtu_discovery={{tunneldigger.pmtu_discovery}}
  40. ;
  41. tunnel_timeout={{tunneldigger.tunnel_timeout}}
  42. [log]
  43. ; Log filename
  44. {% if tunneldigger.instance_per_domain == True %}
  45. filename=/var/log/tunneldigger-broker_domain{{item.key}}.log
  46. {% else %}
  47. filename=/var/log/tunneldigger-broker.log
  48. {% endif %}
  49. ; Verbosity
  50. verbosity=DEBUG
  51. ; Should IP addresses be logged or not
  52. log_ip_addresses=false
  53. [hooks]
  54. ; Arguments to the session.{up,pre-down,down} hooks are as follows:
  55. ;
  56. ; <tunnel_id> <session_id> <interface> <mtu> <endpoint_ip> <endpoint_port> <local_port>
  57. ;
  58. ; Arguments to the session.mtu-changed hook are as follows:
  59. ;
  60. ; <tunnel_id> <session_id> <interface> <old_mtu> <new_mtu>
  61. ;
  62. {% if tunneldigger.instance_per_domain == True %}
  63. ; Called after the tunnel interface goes up
  64. session.up=/srv/tunneldigger/broker/scripts/addif_domain{{item.key}}.sh
  65. ; Called just before the tunnel interface goes down
  66. session.pre-down=/srv/tunneldigger/broker/scripts/delif_domain{{item.key}}.sh
  67. {% else %}
  68. ; Called after the tunnel interface goes up
  69. session.up=/srv/tunneldigger/broker/scripts/addif.sh
  70. ; Called just before the tunnel interface goes down
  71. session.pre-down=/srv/tunneldigger/broker/scripts/delif.sh
  72. {% endif %}
  73. ; Called after the tunnel interface goes down
  74. session.down=
  75. ; Called after the tunnel MTU gets changed because of PMTU discovery
  76. session.mtu-changed=