Repository navigation
Conversation
f41c0e1 to
1ddf91f
Compare
This package provides an all-in-one web interface to configure OpenVPN servers and clients quickly. It includes a setup wizard, a built-in key generator, smart firewall protection, port and route checks, DDNS, SSL-VPN, and QR-code import/export. With this app, the VPN setup is very simple and intuitive. Signed-off-by: Manfred Jaider <info@masmbit.com>
1ddf91f to
e032a2c
Compare
BKPepe
left a comment
There was a problem hiding this comment.
The wizard and dashboard are useful additions, but I’m not convinced the current implementation should introduce so much custom service, firewall and configuration management logic.
Why does this need to duplicate functionality already provided by OpenWrt instead of building on the existing OpenVPN integration? A separate LuCI app makes sense for the UI and higher-level workflows, but it should reuse the existing infrastructure wherever possible.
More importantly, the current patch has serious security issues around RPC permissions, shell command injection, private-key exposure and file permissions. These need to be addressed before this can be considered for inclusion.
|
Yes, I need to change that: "Smart Firewall" is the wrong name and leads to misunderstandings that an additional firewall is running here. I will rename it to "OpenVPN Firewall Filters or something similar". It is not an additional firewall, but rather specific filters exclusively for OpenVPN that utilize the firewall4 (fw4) tables. These filters only make sense in combination with OpenVPN. They were created to intercept massive bot attacks and scans, thereby relieving the OpenVPN process and preventing flooding. Otherwise, I have tried as much as possible to avoid developing anything extra or parallel, focusing instead on using OpenWrt's built-in tools. Furthermore, care was taken to minimize extra dependencies and avoid creating anything redundant (everything is programmed to fully suffice with BusyBox and uci). The only unavoidable dependencies are: I am currently analyzing and correcting the issues mentioned above. :D |
f5ebc4a to
30ffbd5
Compare
|
Hi there! I truly appreciate your time and helpful guidance on this PR. To keep the application as clean and lightweight as possible, I have strictly avoided adding duplicate code or redundant modules. The entire package is fully designed to build directly on top of OpenWrt's existing infrastructure, utilizing built-in system tools like BusyBox and UCI wherever possible to minimize extra dependencies. Following the review, I have updated the code to implement all requested security and structural improvements:
Everything has been fully cleaned up, tested, and is ready to go! Thank you for helping me make this application better and safer for the community. |
…cles This update completely resolves security concerns regarding private-key exposure, shell command injection, RPC ACL permissions, and file leaks. - Fix ACL data exposure: Removed readfile and restricted readstatus paths. - Fix write race condition: Added inline umask 077 constraints. - Fix worker lifecycle: Decoupled tasks into sub-functions with shift. - Safe PID cleanup: Added traps and explicit rm endpoints for PID files. - Checked script against ShellCheck v0.11.0 rules. Signed-off-by: Manfred Jaider <info@masmbit.com>
30ffbd5 to
fa1eccb
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- fa1eccb "luci-app-openvpn-plus: fix security vulnerabilities and worker lifecycles": this commit is still a fix-up of the package that e032a2c adds in this same PR, so squash the two. The body also leaves out that it deletes
Makefile.standalone/Makefile.upstreamand the uci-defaults script, removes themakedir/removedirsubcommands, and rewrites LICENSE, README and the translations.
Generated by Claude Code
| } | ||
| ovpnservice_worker() { | ||
| shift # Remove "ovpnservice_worker" from the arguments list | ||
| local pid_file="$1" |
There was a problem hiding this comment.
The *_worker subcommands are reachable from the RPC exec grant, and they take pid_file from argv and rm -f it on exit. That means ovpnservice_worker /etc/config/firewall x deletes any file and bypasses internal_securepath. Hard-code the pid path inside each worker (lines 1950, 1970 and 1989 too), and validate instance before keygen_async builds /var/run/openvpn.keygen-${instance}.pid from it at line 1984.
Generated by Claude Code
| if (skipTrim === true) { | ||
| return res.stdout.trim(); | ||
| } else { | ||
| return res.stdout.trim(); | ||
| } |
There was a problem hiding this comment.
Both branches trim, so skipTrim does nothing, even though the readfile/readstatus callers pass true to keep whitespace. The same applies to openvpn-status.js lines 177-181.
| if (skipTrim === true) { | |
| return res.stdout.trim(); | |
| } else { | |
| return res.stdout.trim(); | |
| } | |
| return (skipTrim === true) ? res.stdout : res.stdout.trim(); |
Generated by Claude Code
| ucisortovpn) ucisortovpn ;; | ||
| cleanup) cleanup "$@" ;; | ||
| keymeta) keymeta "$@" ;; | ||
| keygenclean) keygenclean ;; |
There was a problem hiding this comment.
keygenclean() now starts with shift, but it is called here without arguments, so the shift fails on an empty parameter list. Pass "$@" as the other dispatch entries do.
| keygenclean) keygenclean ;; | |
| keygenclean) keygenclean "$@" ;; |
Generated by Claude Code
There was a problem hiding this comment.
To be honest, I'm not entirely comfortable with the fact that we're using NFT commands directly here. Either we attach this to the service via a separate firewall object. see -> https://github.com/search?q=repo%3Aopenwrt%2Fpackages+json_add_array+firewall&type=code, or we write it into the fw4 hooks so that fw4 includes it when it loads. -> see https://openwrt.org/docs/guide-user/firewall/firewall_configuration#drop-in_includes_for_package_authors.
Pull request details
Description
This PR adds
luci-app-openvpn-plus. It is a modern and easy web interface to set up OpenVPN servers and clients quickly.The app does all the hard background work automatically so users do not need to write complex config files.
Key features include:
Real-world speed tests on cheap hardware (Zyxel NWA50AX Pro APs) reached more than 450 Mbps in UDP Site-to-Site mode (using DCO) and over 200 Mbps in TCP/SSL-VPN mode.
Screenshot
Server Example with two Site-To-Site and one Mobile connection

Dark Mode Full supported

Status view

Client Example

Wizard

Mobile Setup

IP Setup Option

DDNS Setup Option

Profile QR-Code scan or download

Muti Site-To-Site Setup Wizard

Open Port and Static Routing view

KeyGen

Key view / edit

config view, firewall ...

Maintainer
@masmbit
Tested on
OpenWrt version: OpenWrt 25.12.5 (r33051-f5dae5ece4)
LuCI version: LuCI openwrt-25.12 branch (26.183.16146~6aacb73)
Web browser(s): Chrome, Firefox, Safari
Checklist