We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey openwisp team,
It seems that it is not possible to have more than one wireguard peer when using the openwrt backend. I think the issue is that the peer is being named after the interface so each peer just overwrites the previous one: https://github.com/openwisp/netjsonconfig/blob/1.0.2/netjsonconfig/backends/openwrt/converters/wireguard_peers.py#L20
The text was updated successfully, but these errors were encountered:
@SerialVelocity could you provide a NetJSON config sample which triggers this issue please?
Sorry, something went wrong.
I haven't tested this, but constructed an example based on your docs (with an extra peer):
{ "interfaces": [ { "name": "wg", "type": "wireguard", "private_key": "QFdbnuYr7rrF4eONCAs7FhZwP7BXX/jD/jq2LXCpaXI=", "port": 51820, "mtu": 1420, "nohostroute": False, "fwmark": "", "ip6prefix": [], "addresses": [ { "proto": "static", "family": "ipv4", "address": "10.0.0.5/32", "mask": 32, } ], "network": "", } ], "wireguard_peers": [ { "interface": "wg", "public_key": "94a+MnZSdzHCzOy5y2K+0+Xe7lQzaa4v7lEiBZ7elVE=", "allowed_ips": ["10.0.0.1/32"], "endpoint_host": "wireguard.test.com", "endpoint_port": 51820, "preshared_key": "", "persistent_keepalive": 60, "route_allowed_ips": True, }, { "interface": "wg", "public_key": "e8yh3kIrMjLVZPi5DS1BU3j3mWkYWrCXvnLSvNkW7HM=", "allowed_ips": ["10.0.0.2/32"], "endpoint_host": "wireguard2.test.com", "endpoint_port": 51820, "preshared_key": "", "persistent_keepalive": 60, "route_allowed_ips": True, } ] }
c4cdf68
@SerialVelocity fixed in the latest master.
Successfully merging a pull request may close this issue.
Hey openwisp team,
It seems that it is not possible to have more than one wireguard peer when using the openwrt backend. I think the issue is that the peer is being named after the interface so each peer just overwrites the previous one:
https://github.com/openwisp/netjsonconfig/blob/1.0.2/netjsonconfig/backends/openwrt/converters/wireguard_peers.py#L20
The text was updated successfully, but these errors were encountered: