Add radicale to vpn config & use RouteTable directive
This commit is contained in:
parent
43f662f3ff
commit
6b2c70f5da
8 changed files with 51 additions and 71 deletions
|
|
@ -7,13 +7,14 @@ Description=WireGuard tunnel {{ vpn_default.interface }}
|
|||
|
||||
[WireGuard]
|
||||
PrivateKeyFile={{ vpn_default.private_key_path }}
|
||||
RouteTable=main
|
||||
|
||||
{% for peer in vpn_default.peers %}
|
||||
[WireGuardPeer]
|
||||
PublicKey={{ peer.public_key }}
|
||||
PresharedKeyFile={{ peer.preshared_key_path }}
|
||||
{% for ip in peer.allowed_ips %}
|
||||
AllowedIPs={{ ip.address }}
|
||||
AllowedIPs={{ ip }}
|
||||
{% endfor %}
|
||||
{% if peer.endpoint %}
|
||||
Endpoint={{ peer.endpoint }}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,3 @@ Name={{ vpn_default.interface }}
|
|||
Address={{ vpn_default.ip }}/{{ vpn_default.prefix }}
|
||||
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 %}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ Description=WireGuard tunnel {{ vpn_media.interface }}
|
|||
|
||||
[WireGuard]
|
||||
PrivateKeyFile={{ vpn_media.private_key_path }}
|
||||
RouteTable=main
|
||||
|
||||
{% for peer in vpn_media.peers %}
|
||||
[WireGuardPeer]
|
||||
PublicKey={{ peer.public_key }}
|
||||
PresharedKeyFile={{ peer.preshared_key_path }}
|
||||
{% for ip in peer.allowed_ips %}
|
||||
AllowedIPs={{ ip.address }}
|
||||
AllowedIPs={{ ip }}
|
||||
{% endfor %}
|
||||
{% if peer.endpoint %}
|
||||
Endpoint={{ peer.endpoint }}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ Description=WireGuard tunnel {{ vpn_default.interface }}
|
|||
|
||||
[WireGuard]
|
||||
PrivateKeyFile={{ vpn_default.private_key_path }}
|
||||
RouteTable=main
|
||||
|
||||
{% for peer in vpn_default.peers %}
|
||||
[WireGuardPeer]
|
||||
PublicKey={{ peer.public_key }}
|
||||
PresharedKeyFile={{ peer.preshared_key_path }}
|
||||
{% for ip in peer.allowed_ips %}
|
||||
AllowedIPs={{ ip.address }}
|
||||
AllowedIPs={{ ip }}
|
||||
{% endfor %}
|
||||
{% if peer.endpoint %}
|
||||
Endpoint={{ peer.endpoint }}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,3 @@ Name={{ vpn_default.interface }}
|
|||
Address={{ vpn_default.ip }}/{{ vpn_default.prefix }}
|
||||
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 %}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ Description=WireGuard tunnel {{ vpn_media.interface }}
|
|||
|
||||
[WireGuard]
|
||||
PrivateKeyFile={{ vpn_media.private_key_path }}
|
||||
RouteTable=main
|
||||
|
||||
{% for peer in vpn_media.peers %}
|
||||
[WireGuardPeer]
|
||||
PublicKey={{ peer.public_key }}
|
||||
PresharedKeyFile={{ peer.preshared_key_path }}
|
||||
{% for ip in peer.allowed_ips %}
|
||||
AllowedIPs={{ ip.address }}
|
||||
AllowedIPs={{ ip }}
|
||||
{% endfor %}
|
||||
{% if peer.endpoint %}
|
||||
Endpoint={{ peer.endpoint }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue