I'm running Ubuntu 16.04.3 LTS as a server&router and recently I've set up a VPN connection (with private internet access) for a specific user (user: pia). I've configured the server to use PIA's DNS servers but ever since setting it up I've noticed significantly reduced internet speed for regular users, e.g. when running speedtest

Interestingly enough running speedtest as pia (sudo -u pia speedtest-cli) gives acceptable results given that it is going through a VPN, and is significantly faster than for other users. Also internet speeds from other clients behind the router aren't affected.

I get the feeling that for some reason the speedtest traffic by regular users is routed through the US, back to a server in my hometown Amsterdam, as it shows a latency of 260ms with a server distance of some 3km. Also when I ping google.com as a regular user i get:

64 bytes from yul02s05-in-f14.1e100.net ( icmp_seq=1 ttl=53time=116 ms

while as user pia I get:

64 bytes from dh-in-f113.1e100.net ( icmp_seq=1 ttl=48 time=32.2 ms

However if I ping as a regular user I get latencies around 22ms, so at least dns lookup is inefficient.

Any clues are very welcome.

  • What network layer config do you use for VPN, TUN or TAP? – Praveen Premaratne Dec 9 '17 at 20:29
  • The VPN interface is tun1 (actually running a VPN server as well on tun0). I suppose this means the network layer config is TUN? – user2329915 Dec 10 '17 at 21:58
  • Yes, it's a TUN. Your problem sounds like, users are using the VPN for all traffic, so double check if the VPN client users use have route all the traffic through the VPN. – Praveen Premaratne Dec 10 '17 at 22:03
  • Thanks. When I curl ipecho.net/plain as a regular user I get my normal WAN ip-adress whereas when I run it as the VPN user I get the VPN ip. This should confirm that only the vpn user is actually routed through the VPN right? – user2329915 Dec 11 '17 at 13:15
  • Well, its look like working fine for me. The only other thing could cause this is the ISP upload & download setting. I.E my company has a corporate line, that means if any given time, the upload request higher bandwidth (i.e. sending data through VPN), that bandwidth is taken from download speed. I see most of the time 120mbps UP & 80mbps DOWN, our line is 200mbps UP&DOWN. So check that's the case. – Praveen Premaratne Dec 11 '17 at 20:00

Your Answer

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

Browse other questions tagged or ask your own question.