Use preshared key inside configuration

File options do not seem to work
This commit is contained in:
sonny 2021-12-29 12:00:02 +01:00
parent 603718458d
commit 16a979b04b
6 changed files with 20 additions and 4 deletions

View file

@ -7,12 +7,12 @@ Description=WireGuard tunnel wg0
[WireGuard]
ListenPort={{ vpn_port }}
PrivateKeyFile={{ vpn_server_key_path }}
PrivateKey={{ vpn_server_key }}
{% for peer in vpn_peers %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
PresharedKey={{ peer.preshared_key }}
AllowedIPs={{ peer.ip }}/32
{% if not loop.last %}

View file

@ -4,4 +4,4 @@
Name={{ vpn_interface }}
[Network]
Address={{ vpn_listen_address }}/24
Address={{ vpn_listen_address }}/{{ vpn_subnet }}