Need experts! Dahua Camera + OpenVPN = 30kbps max?

Dustin

n3wb
Joined
May 12, 2017
Messages
7
Reaction score
0
I have an issue that I've been trying to solve for a little while now, and I figured the best thing to do was to hopefully enlist the help of the excellent members here since I am at my wits end.

I have four Dahua IPC-HDW5231R-Z cameras running on a NVR5208-4KS2 that are working great. I can connect to them with GDMSS on four different devices seamlessly with using my local wireless network, and I get ~150kbps streams from all of them in real-time with crystal clear quality.

However, when I am remotely connected on my phone via VPN over a mobile connection (Verizon Wireless), the connection speed slows to a crawl and I can barely get more than a total 30kbps max for all four cameras (~3-8kbps per camera; about 1 frame every 45 seconds).

I have connected to my home network via VPN using my neighbor's wifi, and the cameras work perfectly (>500kpbs), indicating that my OpenVPN server seems to be working fine (on a Linksys WRT1900ACS; firmware up to date)

My speedtest.net results on both of the Verizon phones (different accounts, same problem on both devices) are ~12Mbps, so I'm pretty sure it's not those. Also, while connected through my VPN on both devices, the speedtest.net results are still ~11Mbps, so I don't think I'm losing speed much there either.

I feel like this is probably an OpenVPN setting issue, but I am at a loss for what it could be.

Any suggestions would be extremely helpful.
 

redfive

Pulling my weight
Joined
Apr 13, 2016
Messages
509
Reaction score
205
Are you able to test with a tool like iperf, between your phone, connected to the Openvpn server, and a device in the same network as the NVR ?
Cheers,
jonatha
 

Dustin

n3wb
Joined
May 12, 2017
Messages
7
Reaction score
0
I wasn't, but after lengthy amounts of fiddling, I did discover the source of the problem and a workaround.

Luckily, I also have a Synology DS916+ NAS that is capable of running an OpenVPN server as well. I was able to successfully get that set up running OpenVPN and my speeds are back to normal. The problem clearly resides in the Linksys router's OpenVPN firmware.

I feel pretty sure I could switch it to DD-WRT and get it working better, but the thought of having to set up my entire network again sounds arduous when I've got a solution that meets my needs.
 

Dustin

n3wb
Joined
May 12, 2017
Messages
7
Reaction score
0
Strangely enough, the stock Linksys firmware doesn't allow you to prioritize OpenVPN in the QoS.

I have a few things defined for higher priority in QoS, but I know what they are and they were not active during any of my testing.

I suppose I could have prioritized my OpenVPN port number... Might be worth a check later.
 

Xeddog

Getting comfortable
Joined
Apr 27, 2017
Messages
330
Reaction score
547
I use OpenVPN on my Asus dead spider router and I can get speeds up to 20Mbps. But in all honesty, I had to upgrade to get that. My previous Asus router was MUCH slower, but not as slow as yours.

Wayne
 

MakeItRain

Pulling my weight
Joined
Aug 7, 2017
Messages
401
Reaction score
218
VPN has to encrypt the traffic which is largely dependent on the CPU horsepower. Not all routers have fast CPUs.
 
Joined
May 23, 2019
Messages
12
Reaction score
13
Location
USA
Are you using UDP or TCP for your VPN?
Are you using 128-bit or 256-bit encryption?
Are you using compression?
 

Dustin

n3wb
Joined
May 12, 2017
Messages
7
Reaction score
0
I tried both UDP and TCP, same result. I can't change the encryption level, but it's at 256-bit. No compression.

Btw, I should add that at one point, the OpenVPN on the Linksys router used to work just fine. Probably for almost 2 years. Only in the past few months has it slowed to a crawl. I know that the router is capable of delivering a high quality stream, but for some reason it stopped doing it. Unfortunately, I can't pinpoint when it stopped working as expected to be able to come to a root cause. My suspicion is there may have been a firmware update to the router that messed it up, but I can't say for sure. Doing a factory reset on it would be the next thing to try but uggggghhhhh... restoring all my settings would be frustrating.
 

redfive

Pulling my weight
Joined
Apr 13, 2016
Messages
509
Reaction score
205
But a thing isn't still so clear to me, when you were connected to the openvpn server via the mobile connection, the throughput was crap, while when you were connected to the openvpn server via your neighbor's wifi, the speed was better ? The Openvpn server was running on the same host ?
Cheers,
jonatha
 

Dustin

n3wb
Joined
May 12, 2017
Messages
7
Reaction score
0
Yes, that is correct. That was super confusing to me as well.
 
Top