choose a valid edgeos interface name

This commit is contained in:
Callan Bryant 2020-10-19 17:52:54 +01:00
parent d0e8eb74ec
commit fceddc55dd
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

14
add.go
View File

@ -24,17 +24,17 @@ PersistentKeepalive={{ .Keepalive }}
`
const vyattaPeerConf = `configure
set interfaces wireguard dsnet address {{ .Peer.IP }}/{{ .Cidrmask }}
set interfaces wireguard dsnet route-allowed-ips true
set interfaces wireguard dsnet private-key {{ .Peer.PrivateKey.Key }}
set interfaces wireguard dsnet preshared-key {{ .Peer.PresharedKey.Key }}
set interfaces wireguard wg0 address {{ .Peer.IP }}/{{ .Cidrmask }}
set interfaces wireguard wg0 route-allowed-ips true
set interfaces wireguard wg0 private-key {{ .Peer.PrivateKey.Key }}
set interfaces wireguard wg0 preshared-key {{ .Peer.PresharedKey.Key }}
{{- if .DsnetConfig.DNS }}
#set service dns forwarding name-server {{ .DsnetConfig.DNS }}
{{ end }}
set interfaces wireguard dsnet peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} endpoint {{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }}
set interfaces wireguard dsnet peer allowed-ips {{ .AllowedIPs }}
set interfaces wireguard dsnet peer persistent-keepalive {{ .Keepalive }}
set interfaces wireguard wg0 peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} endpoint {{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }}
set interfaces wireguard wg0 peer allowed-ips {{ .AllowedIPs }}
set interfaces wireguard wg0 peer persistent-keepalive {{ .Keepalive }}
commit; save
`