Update wg0.conf.tmpl

This commit is contained in:
Manevolent 2022-12-21 22:42:58 -07:00 committed by GitHub
parent 2c09168b75
commit 5afa755351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
[Interface] [Interface]
PrivateKey = ${wg_key} PrivateKey = ${wg_key}
Address = ${wg_address}/${wg_prefix:-32} Address = ${wg_address}/${wg_prefix:-32}
ListenPort = ${wg_port:-51820} ListenPort = ${wg_port:-9983}
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; PostUp = iptables -A FORWARD -i wg0 -j ACCEPT;
{{ if len "${wg_routes:-}" }}{{ range "$wg_routes" | split "," }}PostUp = ip -4 route add {{ . }} dev wg0 metric 31 {{ if len "${wg_routes:-}" }}{{ range "$wg_routes" | split "," }}PostUp = ip -4 route add {{ . }} dev wg0 metric 31
{{ end }}{{ end }} {{ end }}{{ end }}