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.

  • Your question is not clear. What does the speed test on your android phone has to do with your RPi? What is connected to what network? Oct 10 '16 at 12:21
  • The phone is connected to the vpn server which is hosted at my home. The phone when connected to the vpn server is slow. The network the vpn server runs on is fast enough.
    – Mobalized
    Oct 10 '16 at 13:35
  • I think I'm getting the same issue here, download works, but no upload. Using TCP instead of UDP fixed the problem, but not sure if it's something related to the ISP...
    – Treviño
    Jun 22 '17 at 3:54

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 ( 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 link-mtu and 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 --mssfix.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.