RPi v1 B+ slow OpenVPN speed

0

I'm trying OpenVPN to create a secure link between my home server and wherever I decide to travel. Sadly some of my media at home can't play very well over the network, so I'm trying to find out where the bottleneck is. So I got a PC and my RPI doing some bandwith tests. Both of them are connected to the same switch using the same media (CAT 5e cables).

If I do the test from the PC to the server through the OpenVPN link I get 7.6MB/s which is more than decent considering I don't have any media that goes beyond 1MB/s bit rate. However, if I do the test from the RPI to the server through the OpenVPN link I only get 500KB/s. I don't understand why such a difference in speed if we are using the same media basically. I can get 7MB+ speed between the PC and the RPI.

The only thing that I can think of is that maybe the CPU is the bottleneck? If that's the case maybe I can just route the traffic through the PC, if so how would I go about it?

Tests were done using nc, so maybe not the most accurate but there's still a big difference in bandwidth speeds.

MinusFour

Posted 2017-12-09T03:09:21.983

Reputation: 166

Answers

0

So it seems like the CPU was indeed the bottleneck. I am using a separate device for the OpenVPN link and add routing to both devices. It turned to be a major boost for bandwidth.

Simple rules for routing, on the server:

# iptables -t nat -A POSTROUTING -o enp0s25 -j MASQUERADE
# iptables -A FORWARD -i tun0 -o enp0s25 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i enp0s25 -o tun0 -j ACCEPT

And on the client I just add the route:

# ip route add 10.8.0.0/24 via 192.168.1.68 dev eth0

MinusFour

Posted 2017-12-09T03:09:21.983

Reputation: 166