l2tp_bridge.j2 1009 B

123456789101112131415161718192021222324
  1. # This file is managed by ansible, don't make changes here - they will be overwritten.
  2. {% for item in domaenenliste|dictsort %}
  3. auto br{{item[0]}}
  4. iface br{{item[0]}} inet manual
  5. # Bring up interface
  6. pre-up brctl addbr $IFACE
  7. {% if item[0] | length > 2 %}
  8. pre-up ip link set address 02:ca:ff:{{item[0][0:2]}}:{{item[0][2:]}}:{{item[1].server_id}} dev $IFACE
  9. {% else %}
  10. pre-up ip link set address 02:ca:ff:ee:{{item[0]}}:{{item[1].server_id}} dev $IFACE
  11. {% endif %}
  12. pre-up ip link set dev $IFACE mtu {{tunneldigger.pmtu}}
  13. pre-up ip link set $IFACE promisc on
  14. pre-up ip link set dev $IFACE up
  15. post-up ebtables -A FORWARD --logical-in $IFACE -j DROP
  16. post-up batctl -m bat{{item[0]}} if add $IFACE
  17. # Shutdown interface
  18. pre-down batctl -m bat{{item[0]}} if del $IFACE
  19. pre-down ebtables -D FORWARD --logical-in $IFACE -j DROP
  20. down ip link set dev $IFACE down
  21. post-down brctl delbr $IFACE
  22. {% endfor %}