Do you experience similar connectivity issues when using a VPN provider for torrenting? I have tried different servers (which allow torrenting), both udp/tcp protocol, and the recommended dns settings, yet it remains quite buggy. Somtimes, it works well and remains stable for a few days or even weeks. But eventuelly it loses connection, although it says it's still connected. Have any of you encountered the same problems?
I am using: DSM 6.2.4-25556 Update 7 and Proton as VPN Provider.
My current setup of running qBittorrent in a docker container, and VPN service in another container, gives me stable torrenting via the VPN connection. Also running DSM 6.2
With download station. I think the problem is not the acutally torreting, it's more the connection to the vpn server which is not stable. Thx, I will take a look into docker container, maybe this is the better solution.
I gave up on DSM's own VPN client setup, because IIRC first it only supports OpenVPN, and 2nd it tends to quietly disconnect from the VPN server even if keep-alive is enabled.
But if you do want to stick with DSM VPN, I wrote a script before that would help revive the connection even if it gets severed. Maybe this will help you. Let me know if you want to give it a try, so I can see if I still have it somewhere to share with you.
Yes, this is exactly what happens to my connection. If you still have your script around feel free to share it. I will have a look at it since I don't have any experience with dockers. Thx very much.
Ok once I get home tonight I will search for it. It worked pretty well actually but eventually I made the switch to docker VPN anyway because of Wireguard support.
Quoting the relevant info from this site:
The DSM comes with a command line tool to manage the VPN connection. As you’ll see the ergonomy is debatable, but it allows to initiate the connection from the shell.
This tool is synovpnc, but before we can use it, we need the following file:
/usr/syno/etc/synovpnclient/vpnc_connecting
This is a temporary file that lives only a few seconds after you click “Connect” in the VPN configuration GUI.
Your mission is to click on “Connect” and cat this file so you can see the configuration.
It should be something among those lines:
conf_id=o1481981647 conf_name=MyVpnConnection proto=openvpn
The conf_id and conf_name is what we are after.
Once found, just change o1663422808 and Surfshark_HK with the names you found following the above instructions.
(Edit: Note - there are multiple occurrences of o1663422808 (and possibly Surfshark_HK) in the script, so change all occurrences)
Now that we have created the script, 2 additional steps are needed:
Uncheck the 'Reconnect when the VPN connection is lost' checkbox. This script takes over the monitoring / restarting.
We need a way to run the script at system startup. Either you can figure out how to utilize 'task scheduler' to do this, or do what I did:
cd to /usr/local/etc/rc.d , then create a 'startup.sh' with the following content:
#!/bin/sh
# Start everything up in background.
# My experience shows Synology may start these process one by one, and only if one has finished will it start the next one.
# So for script with forever loops, it potentially will block other scripts from running
# Therefore I need to use one single script to start other scripts in the background.
case $1 in
start)
/bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh stop
/bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh start &
;;
stop)
/bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh stop &
;;
esac
Again, change xxxxx with your home folder (or whatever folder you placed the watchdog script in).
Also, remember to 'chmod +x' the scripts so they become executable.
Quoting the relevant info from this site:
The DSM comes with a command line tool to manage the VPN connection. As you’ll see the ergonomy is debatable, but it allows to initiate the connection from the shell.
This tool is synovpnc, but before we can use it, we need the following file:
/usr/syno/etc/synovpnclient/vpnc_connecting
This is a temporary file that lives only a few seconds after you click “Connect” in the VPN configuration GUI.
Your mission is to click on “Connect” and cat this file so you can see the configuration.
It should be something among those lines:
conf_id=o1481981647 conf_name=MyVpnConnection proto=openvpn
The conf_id and conf_name is what we are after.
Once found, just change o1663422808 and Surfshark_HK with the names you found following the above instructions.
(Edit: Note - there are multiple occurrences of o1663422808 (and possibly Surfshark_HK) in the script, so change all occurrences)
Now that we have created the script, 2 additional steps are needed:
Uncheck the 'Reconnect when the VPN connection is lost' checkbox. This script takes over the monitoring / restarting.
We need a way to run the script at system startup. Either you can figure out how to utilize 'task scheduler' to do this, or do what I did:
cd to /usr/local/etc/rc.d , then create a 'startup.sh' with the following content:
#!/bin/sh
# Start everything up in background.
# My experience shows Synology may start these process one by one, and only if one has finished will it start the next one.
# So for script with forever loops, it potentially will block other scripts from running
# Therefore I need to use one single script to start other scripts in the background.
case $1 in
start)
/bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh stop
/bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh start &
;;
stop)
/bin/sh /volume1/homes/xxxxx/vpn_watchdog.sh stop &
;;
esac
Again, change xxxxx with your home folder (or whatever folder you placed the watchdog script in).
Also, remember to 'chmod +x' the scripts so they become executable.