Conversation
59653c7 to
0575cfd
Compare
|
I added your PR to my build and I can see that it tries to convert my existing OpenVPN. However I have
Unfortunately I have very little time this week to research it further :( |
In the UI? Yes - of course. That part's still cooking. Then everything is as it should be. You don't execute the proto handler yourself - netifd calls it - simply just issue a |
Sorry for my delayed response, I did not use the GUI to create it , I did that manually according to this PR but was thrown off by the I can now confirm that openvpn is started and a tunnel is established, only thing is I get a duplicate config on the command line: It does however work and pinging through the tunnel is also OK Anything else you want me to test? |
|
I am also looking into PBR. I added the device to the network config of openvpn: I noticed that |
|
That's great. Thank you @egc112. I fixed the duplicate --config thing after you downloaded it. The device portion is a bit more tricky. A tun only makes the device at up time. And only some taps are available before the tunnel comes up. So I'm not certain how to reconcile this unless I blacklist the --dev-type parameter and enforce it based on the presence of an underlying and already present device. That can go in a future version, since it never existed in the procd script. In the UI I have, it's possible to name the --dev, so there's something predictable for pbr to use, at least. Maybe @stangri can give me a high-level overview - does it hook into netifd events? Or does it just mandate stable presence of an interface? Maybe just the hotplug script is enough. Otherwise I don't think network_get_device returns anything interesting for an openvpn interface. What does yours show for an ovpn tunnel when you do |
Yes I am aware of this and PBR deals with this at the moment in the following way: So in the old way an interface is made with the device according to the openvpn config: The I tried it in the new interface like this: My hope was that this could also be read back with But adding a Device entry box with text that it should mimic the device in the openvpn config and make it so that If that of this is not possible or feasible then we can still use the old way just adding an other interface with proto I already pinged Stan about it :) |
|
Did you restart the tun/iface after this?
I think netifd needs this device to exist. So for tuns and taps with no dev...
That's what it looks like we should do so netifd and proto layer stuff works out. An interface which points to an interface/dev :) (plus maintaining this behaviour isn't a bad thing, if users are already familiar with this modus operandi) |
|
ping @GeorgeSapkin for initial comments |
Yes I did but the device is not reproduced with But no big deal, the old way still works 🙂 |
|
Just tested your latest changes and everything is working, thanks 👍 |
|
Great. I have a UI which you can also test once I get some other fixes out... |
|
Good work. But a silly question without me looking into the source in more detail. What about the server side? My openwrt router acts as a server and my clients are connected to it via the internet. Is that still possible with this protocol? |
|
Nice, will test it again the coming days. About all the options why not do it with only the most important options available in the GUI and then add a text box where users can add openvpn option in OpenVPN style which will be added |
@feckert yes, it is. Everything continues to work. netifd manages the process lifecycle. @egc112 that's what I thought. Alas, everyone needs something different. |
|
OK - all set. If you're happy @feckert we can get this in for 25. |
openvpn needs a proto handler. Here it is. Removed all of the up/down scripts from the init handler and made those entirely optional (with some ucode examples). The config options have been updated to reflect v 2.6/2.7, with a 'd' flag to denote deprecated. Deprecated flags are gated behind an 'allow_deprecated' config flag, which must be on to use them. Some flags will cease to work in the next version. Users should not be using compression. Openvpn has enough security holes and pitfalls already without using compression. Updated the example configs (left in place as legacy documentation) and removed older cryptos which do not exist in ovpn any longer. A migration script is included -x. /etc/config/openvpn entries become interface entries in /etc/config/network with proto='openvpn'. The source config is retained. Signed-off-by: Paul Donald <newtwen+github@gmail.com> openwrt#28533
In preparation for netifd support for ucode proto handlers. Signed-off-by: Paul Donald <newtwen+github@gmail.com> openwrt#28533
If you need the security risks of using compression, make a custom build. Signed-off-by: Paul Donald <newtwen+github@gmail.com> openwrt#28533
This eases management of live servers via its socket interface. Signed-off-by: Paul Donald <newtwen+github@gmail.com> openwrt#28533
This plugin has not seen updates to keep it synchronised with recent openvpn, nor any updates in the last several years. It relies on the SHA1 algo which is deprecated, and iptables. ovpn has its own management interface. Signed-off-by: Paul Donald <newtwen+github@gmail.com> openwrt#28533
📦 Package Details
Rewrite openvpn scripts as a proto handler.
I want to get some initial feedback from openvpn users and catch any behaviour changes. If you must use DEPRECATED options, add the flag
option allow_deprecated '1'.Put the proto handler script in
/lib/netifd/proto/,chmod +xand graft your openvpn config into/etc/config/network:e.g. openvpn config
becomes network config
ping @egc112
🧪 Run Testing Details