Add transmission route configuration

This commit is contained in:
Sonny Bakker 2025-03-09 20:55:43 +01:00
parent 58b8d145e6
commit 8920ba56f3
5 changed files with 36 additions and 4 deletions

View file

@ -12,7 +12,9 @@ PrivateKeyFile={{ vpn_default.private_key_path }}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
AllowedIPs={{ peer.allowd_ips }}
{% for ip in peer.allowed_ips %}
AllowedIPs={{ ip.address }}
{% endfor %}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}
{% endif %}

View file

@ -7,3 +7,13 @@ Name={{ vpn_default.interface }}
Address={{ vpn_default.ip }}/{{ vpn_default.subnet }}
DNS={{ vpn_default.dns }}
Domains={{ vpn_default.domains | join(' ') }}
{% for peer in vpn_default.peers %}
{% for ip in peer.allowed_ips %}
{% if ip.create_route %}
[Route]
Destination={{ ip.address }}
Scope=link
{% endif %}
{% endfor %}
{% endfor %}

View file

@ -12,7 +12,9 @@ PrivateKeyFile={{ vpn_media.private_key_path }}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
AllowedIPs={{ peer.allowd_ips }}
{% for ip in peer.allowed_ips %}
AllowedIPs={{ ip.address }}
{% endfor %}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}
{% endif %}

View file

@ -7,3 +7,13 @@ Name={{ vpn_media.interface }}
Address={{ vpn_media.ip }}/{{ vpn_media.subnet }}
DNS={{ vpn_media.dns }}
Domains={{ vpn_media.domains | join(' ') }}
{% for peer in vpn_media.peers %}
{% for ip in peer.allowed_ips %}
{% if ip.create_route %}
[Route]
Destination = {{ ip.address }}
Scope = link
{% endif %}
{% endfor %}
{% endfor %}