I had been running a PPTP vpn to my home network for about a year now but decided to go for the OpenVPN setup instead. Fresh Jessie image, and I setup the VPN using these instructions OpenVPN Setup. I have internet access and local network access which is great, the problem is I can't even get 1Mbps download, and my upload is 0MBps. This is measured using Speedtest on an android phone which is connected to the VPN over a 4g network. Using the Pi to speedtest with speedtest-cli I have 36Mbps down and 6Mbps up. Any idea on something in the configuration that could effect this? Top isn't showing over 30% cpu usage during testing.
It think the reason why the upload is not working it is the same I had: my network MTU is 1492 (1500 - 8 taken off by PPPoE), thus the packets needs to be fragmented more in order to make them to be accepted by your router.
In fact, by running this script (which goes through the MTU values and stops the first time a packet gets back):
for i in $(seq 1500 -1 1300); do if timeout 0.3 ping -c1 -q google.com -s $i; then echo "First good MTU vlaue is $i"; break; fi; done
PING google.com (188.8.131.52) 1464(1492) bytes of data
And you can see that the actual packet size in brackets, match.
Now, to to get this working in OpenVPN you can play with various MTU options, including
tun-mtu, but it's more suggested to use higher level options. So, in my case, using
--link-mtu 1396 was working properly, as the overehead added by openvpn was 96 bytes (don't take this number as granted).
As said, you shouldn't use that a part from testing, but instead
Anyway, what you want to do is experimenting values starting from 1300, and increasing until you don't get a working setup.
So, in my case the final configuration was:
dev tun proto udp mssfix 1396 port 1194