opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.08k stars 701 forks source link

WireGuard Peer generator - Config download button #7360

Open mhlas7 opened 2 months ago

mhlas7 commented 2 months ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the solution you like

Thank you for implementing the new WireGuard Peer Generator page! (and thank you for putting up with all of my feature requests on this topic)

It would be great to have a download config button next to the completed config text. This would download the generated config the users computer. File name could be something along the lines of WG_<Instance>_<Name>.conf. This would make it easier to distribute configs to users who can not scan a QR code (e.g. PC users).

TheHellSite commented 2 months ago

Very much would love to see this feature!

Of course the QR-Code is easy, quick and can be stored somewhere, but it doesn't allow for afterwards editing the config. Then again on wiregaurd desktop apps there is now way to scan a QR-Code.

Maybe even a template section for the peer generator would be nice, where most of the fields can be pre-configured.

Another approach could be to move that download part to the peers tab.

  1. Click on edit the peer and then there comes the QR-Code alongside the .conf file.
  2. But this would mean that the peers section needs to save
    • Allowed IPs from the instance/server point of view (f.e. peer IP - 192.168.2.10/32)
    • Allowed IPs from the peers point of view (f.e. OPNsense subnets - 192.168.10.0/24, 192.168.50.0/24)
    • DNS from the peers point of view (f.e. WG Instance IP - 192.168.2.1/32)

Event though the WG instance/server doesn't need to know the information of the peers point it would still greatly simplify updating configs for clients when OPNsense subnets/networks change.