l2tp_broker.cfg.j2 2.6 KB

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