Use preshared key inside configuration
File options do not seem to work
This commit is contained in:
parent
603718458d
commit
16a979b04b
6 changed files with 20 additions and 4 deletions
|
|
@ -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 %}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
Name={{ vpn_interface }}
|
||||
|
||||
[Network]
|
||||
Address={{ vpn_listen_address }}/24
|
||||
Address={{ vpn_listen_address }}/{{ vpn_subnet }}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ table ip filter {
|
|||
iifname "br0" tcp dport {{ ssh_port }} accept comment "SSH"
|
||||
iifname "br0" tcp dport { {{ http_port }}, {{ https_port }} } accept comment "HTTP/HTTPS"
|
||||
|
||||
iifname "br0" tcp dport {{ vpn_port }} accept comment "Wireguard"
|
||||
iifname "br0" udp dport {{ vpn_port }} accept comment "Wireguard"
|
||||
|
||||
iifname "{{ vpn_interface }}" tcp dport { {{ http_port }}, {{ https_port }} } ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "HTTP/HTTPS"
|
||||
iifname "{{ vpn_interface }}" tcp dport {{ transmission_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "Transmission"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue