MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.78k stars 495 forks source link

Wireguard - User management setting in dietpi-config or dietpi-xyz #3100

Open Vansinnet opened 5 years ago

Vansinnet commented 5 years ago

Describe the solution you'd like:

I'd like to be able to add and remove clients/users more easily. Currently you have to do a lot of work to add a client to Wireguard server.

Would be cool to add something like this to dietpi-config or dietpi-xyz:

https://github.com/adrianmihalko/raspberrypiwireguard/wiki/User-management-with-Wireguard-User-Management-script

Would make it very simple to add all your phones and other devices to server config and at the same time a QR-code is generated for the clients to scan.

MichaIng commented 5 years ago

@Vansinnet Many thanks for your request.

We plan a dedicated dietpi-vpn program from where you can install and manage VPN servers and clients with WireGuard and OpenVPN, add clients, servers to connect to etc. Will be a bid more work, will see if a start can be done with v6.27.

Vansinnet commented 5 years ago

@MichaIng

That is great! The new RPi4 has the required hardware to get decent speeds over VPN; so I think a lot of people will want "dietpi-vpn"-manager in the coming years.

csgabe commented 5 years ago

An easier way is adding wg-dashboard: https://github.com/wg-dashboard/wg-dashboard

Vansinnet commented 5 years ago

An easier way is adding wg-dashboard: https://github.com/wg-dashboard/wg-dashboard

That's perfect! I'll use this instead of wg_config (which is terminal only).

@MichaIng Couldn't wg-dashboard be used in the meantime until you have everything in place for a dietpi-vpn-module? Maybe incorporate wg-dashboard into dietpi with the 6.26 release?

EDIT: When trying to install wg-dashboard on Dietpi, an error during installation occurs; says the OS is not supported, even though my Dietpi is based on Buster.

MichaIng commented 5 years ago

@Vansinnet This is nothing to implement "meanwhile", but additionally. Our own scripts will always be console and whiptail-based only, wg-dashboard is a nice addition if you want to monitor/configure your WireGuard remotely via web UI.

Vansinnet commented 5 years ago

@MichaIng Does this mean wg-dashboard isn't something to add to Dietpi until you add a Dietpi-VPN-module? (Even if a Dietpi-VPN-module is introduced, Wg-dashboard could be something people would want to install via Dietpi-Software anyway.)

MichaIng commented 5 years ago

@Vansinnet

Does this mean wg-dashboard isn't something to add to Dietpi until you add a Dietpi-VPN-module?

IMO both features are unrelated:

Which one to implement first depends on my time (currently hard to say) and other contributor and user attention for either of them.

You might add this to our FeatHub to raise some attention. Perhaps we change the title of this issue to be a wg-dashboard software request, since DietPi-VPN is on my list anyway?

Vansinnet commented 5 years ago

@MichaIng I'm content with your reply. It's not something I really, really need since I use wg-config to manage users for my Wireguard server. And since you're already planning to implement Dietpi-VPN, I can wait for that. :)

I'm not adding wg-dashboard to Feathub since you're working on Dietpi-VPN. It sounds great and would render wg-dashboard obsolete!

Many thanks for your feedback! And you're doing a great job. :)

HyperCriSiS commented 2 years ago

This one seems also good: https://github.com/ngoduykhanh/wireguard-ui

MichaIng commented 2 years ago

A pure slim CLI has benefits as well, but I agree that providing an install option for the existing web interface is probably the better first step.

Joulinar commented 2 years ago

It looks nice and is easy to run (just a single executable) but it did not recognise existing installations/configuration. It's generating an own key pair. Means whole existing configuration for server and clients would need to be migrated somehow. https://github.com/ngoduykhanh/wireguard-ui/issues/177

As well login user/pass seems to be written into a config file without encryption https://github.com/ngoduykhanh/wireguard-ui/issues/45