Jump to content
binhex

[Support] binhex - DelugeVPN

4112 posts in this topic Last Reply

Recommended Posts

I fear this question will demonstrate my ignorance of all things VPN but here goes...

 

I've had DelugeVPN running with PIA as the service and Privoxy turned on for quite some time beautifully.   I also have my local machines and services using the privoxy no problem.  Can I use the DelugeVPN as an OpenVPN server to connect a machine with OpenVPN client from a remote network to gain secure access to the local network?  If so, can someone point me to instructions to get me going?

Share this post


Link to post
3 minutes ago, elmn8r said:

I fear this question will demonstrate my ignorance of all things VPN but here goes...

 

I've had DelugeVPN running with PIA as the service and Privoxy turned on for quite some time beautifully.   I also have my local machines and services using the privoxy no problem.  Can I use the DelugeVPN as an OpenVPN server to connect a machine with OpenVPN client from a remote network to gain secure access to the local network?  If so, can someone point me to instructions to get me going?

No, DelugeVPN is simply Deluge with a built-in VPN capability.  It does not function as a VPN server.  There are a couple of excellent OpenVPN Access Server dockers for unRAID and you can certainly use one of them to enable connections to your server via an Open VPN client.

 

I use both DelugeVPN and OpenVPN-AS on my server.

  • Like 1

Share this post


Link to post
10 minutes ago, elmn8r said:

I fear this question will demonstrate my ignorance of all things VPN but here goes...

 

I've had DelugeVPN running with PIA as the service and Privoxy turned on for quite some time beautifully.   I also have my local machines and services using the privoxy no problem.  Can I use the DelugeVPN as an OpenVPN server to connect a machine with OpenVPN client from a remote network to gain secure access to the local network?  If so, can someone point me to instructions to get me going?

As @Hoopster said, it's not a server.  I used to have openVPN set up on Unraid as per Spaceinvaderone's excellent YouTube tutorial.

 

I've since upgraded my router to a pfSense box, where I can run openVPN directly there (bonus here is that the connection isn't slowed by Unraid activity, and I can make all changes to Unraid without losing connection).

 

However, lots of people cleverer than me are running it (and indeed pfSense) on Unraid.

  • Like 1

Share this post


Link to post
11 hours ago, binhex said:

i think i see the issue, i have rebuilt the image without the single quotes for the optional argument(s), so pull down the new image, obviously keep the single quotes for the run command as they were and see what you get.

I was able to run the entire openvpn command from outside my container and it is the same thing. It connects and initializes fine, then says "Killed" without any logging.

 

Thu Jan 17 21:28:58 2019 /share/CACHEDEV1_DATA/.qpkg/QVPN/etc/init.d/openvpn_up.sh tun0 1500 1558 10.68.10.6 10.68.10.5 init
get_vpn_client_id invalid VPNCONNID=0
get_vpn_server_mark invalid VPNCONNID=0
/etc/init.d/vpn_common.sh: line 772: [: -lt: unary operator expected
Thu Jan 17 21:28:59 2019 Initialization Sequence Completed
Killed

I will continue investigation with some qnap forum posts.

 

**EDIT** - did some more investigation since the QNAP allows me to run openvpn internally:

 

I set up a VPN using Qnap's built in QVPN to my PIA server and it works fine. I then ran "ps aux" to see the command that QVPN runs and it is:

/usr/sbin/openvpnclient --config /etc/config/openvpn/clients/client1 --cd /etc/config/openvpn/clients .... etc

The command I was running and is killed after 30s is straight openvpn, not /usr/sbin/openvpnclient

Looks almost like the QNAP is killing some non-standard openvpn?

 

But then take a look at this, both commands point to the same command!
 

[~] # ll /usr/sbin/|grep vpn
lrwxrwxrwx  1 admin administrators   49 2019-01-16 19:36 openvpn -> /share/CACHEDEV1_DATA/.qpkg/QVPN/usr/sbin/openvpn*
lrwxrwxrwx  1 admin administrators   49 2019-01-16 19:36 openvpnclient -> /share/CACHEDEV1_DATA/.qpkg/QVPN/usr/sbin/openvpn*

Literally I run the same command but with a different link and QTS kills one of them.  :-0  

Works every time... Now if only I can change the docker to run openvpnclient. Or swear at qnap support for this.

Edited by WarezMonkey

Share this post


Link to post
5 hours ago, WarezMonkey said:

Literally I run the same command but with a different link and QTS kills one of them.  :-0  

Works every time... Now if only I can change the docker to run openvpnclient. Or swear at qnap support for this.

very weird!, ok so you can temporarily fix this by editing the script that starts openvpn, BUT im concerned that you are the ONLY qnap user that i am aware of that has this issue, i have seen a couple of dozen or so qnap users come here for support over the years and i think you are the first to have this specific issue, which makes me question whether its something specific to how you have your qnap box setup, maybe try shutting down all other containers and vm's, so you literally have nothing running other than this container, if it then stays up you know the issue is caused by another container/vm etc running on your system, then start them up one by one.

 

if you want to have a play (not permanent) and set it to use the alternative application name then do the following:-

 

start the container, then:-

docker exec -it <name of container> bash
nano /root/openvpn.sh
  

change line 4 from /usr/bin/openvpn to the command you want, save it using ctrl+x then y when prompted to save, and press return to save over existing file, then type exit to get back to host and restart the container.

Share this post


Link to post
2 hours ago, binhex said:

very weird!, ok so you can temporarily fix this by editing the script that starts openvpn, BUT im concerned that you are the ONLY qnap user that i am aware of that has this issue, i have seen a couple of dozen or so qnap users come here for support over the years and i think you are the first to have this specific issue, which makes me question whether its something specific to how you have your qnap box setup, maybe try shutting down all other containers and vm's, so you literally have nothing running other than this container, if it then stays up you know the issue is caused by another container/vm etc running on your system, then start them up one by one.

 

Thanks for your help. I'll do this after work today and let you know. I found a few others out there who have the same issue with openvpn on qnap and someone replied about why this is happening:

Quote

QNAP use a specific management for daemon ... name daemon_mgr
... this daemon management add to start process in daemon state, a "survey" based on daemon_mgr.conf 
... ... this daemon_mgr read the .conf file and do (each 30 secs. (around))
... ... if daemon is in file in "stop" state ... it kill it
... ... if daemon is in "start" state but not running ... after 30 sec. ... daemon_mgr restart it

Sure enough, I find this daemon_mgr.conf file and this is what it says:

DAEMON62 = openvpn, stop, /usr/sbin/openvpn

Not sure why this is there and why it seems to only be there for very few QNAP users.

Share this post


Link to post
9 minutes ago, WarezMonkey said:

Sure enough, I find this daemon_mgr.conf file and this is what it says:


DAEMON62 = openvpn, stop, /usr/sbin/openvpn

lol well that will do it, how odd that its not ALL qnap users that are affected by this.

 

if i were you i would remove that line from that file and see what happens.

Edited by binhex
  • Upvote 1

Share this post


Link to post
2 hours ago, binhex said:

lol well that will do it, how odd that its not ALL qnap users that are affected by this.

 

if i were you i would remove that line from that file and see what happens.

Success! I edited the daemon_mgr.conf file and removed that line. I then restarted the daemon_mgr and the line is still gone. I started up the delugevpn docker and it is stable!! Thanks for the help!

  • Like 1

Share this post


Link to post
On 1/18/2019 at 7:26 AM, binhex said:

lol well that will do it, how odd that its not ALL qnap users that are affected by this.

 

if i were you i would remove that line from that file and see what happens.

Just a heads up that I had the same problem -- thanks to @WarezMonkey for finding the root cause. Removing this line from /etc/daemon_mgr.conf seems to do the trick (different number in my daemon list apparently, but same idea):

DAEMON65 = openvpn, stop, /usr/sbin/openvpn

When I add the line back, things break after about 30 seconds, manifesting as a lot of entries like this in deluge:

 

Error: Cannot assign requested address


And on the docker logs:

 

[info] Deluge listening interface IP 10.8.10.6 and VPN provider IP 10.31.10.6 different, marking for reconfigure                            

I'm suspecting the reason it wasn't an issue for other users in the past may have to do with QNAP switching the default network mode on Docker to NAT instead of bridge at some point, but I'm not sure about that.

If it helps, I'm on a QNAP TS-251 running 4.3.6.0805, on ContainerStation 1.9.3590.

 

I also suspect if @WarezMonkey is right about how daemon_mgr works, simply renaming the docker image's openvpn binary to something else would do the trick, but that'd also involve updating all the scripts that call into it (and possibly os-level stuff in the image?)

 

Thanks for the hard work here; this beats the heck out of the hacked-together VM image I was using for this purpose before!

Edited by droppedD

Share this post


Link to post

What do you guys use to extract your items? I was using simple extractor but keeps disappearing. Thoughts?

Sent from my Pixel 2 XL using Tapatalk

Share this post


Link to post
8 hours ago, droppedD said:

simply renaming the docker image's openvpn binary to something else would do the trick, but that'd also involve updating all the scripts that call into it (and possibly os-level stuff in the image?)

i really dont want to do this, as the issue is specific to qnap only, i think you guys should be feeding back to qnap support and ask the question why are they killing specific/all openvpn processes, seems a very bad thing to do in my opinion, you could always drop qnap and use unraid, its sooo much better 🙂

Share this post


Link to post
6 hours ago, binhex said:

i really dont want to do this, as the issue is specific to qnap only, i think you guys should be feeding back to qnap support and ask the question why are they killing specific/all openvpn processes, seems a very bad thing to do in my opinion, you could always drop qnap and use unraid, its sooo much better 🙂

Yeah... I'm guessing at the very least they need to modify their nanny script to ignore processes namespaced to docker/containerstation since those won't really conflict with the OS processes anyways; I filed a ticket with their support people about this. Unraid sounds like the right solution for my next NAS, I'm sure!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now