PureVPN connects but very slow

5,657

Solution 1

I use PureVPN too. Just don`t touch MTU-parameter or smth...

I recommend you to use OpenVPN.

And here is my solution: For some reason firewall is filtering your TUN/TAP interface by default even without any rules.

So you need to exclude your virtual TUN or TAP interface from Linux firewall. You can exclude your TUN/TAP just by running these commands in terminal -

sudo iptables -A INPUT -i tun0 -j ACCEPT
sudo iptables -A FORWARD -i tun0 -j ACCEPT
sudo iptables -A INPUT -i tap0 -j ACCEPT
sudo iptables -A FORWARD -i tap0 -j ACCEPT

Or by adding these rules in Ubuntu (g)ufw (best practice). Edit this file -

sudo gedit /etc/ufw/before.rules

And add this lines at the bottom of the file before line with word COMMIT

 # allow all on loopback (!check if you already have this!) 
-A ufw-before-input -i lo -j ACCEPT
-A ufw-before-output -o lo -j ACCEPT

 # allow all traffic via our OpenVPN TUN/TAP interfaces
-A ufw-before-input -i tun0 -j ACCEPT
-A ufw-before-input -i tap0 -j ACCEPT
-A ufw-before-forward -i tun0 -j ACCEPT
-A ufw-before-forward -i tap0 -j ACCEPT
-A ufw-before-forward -o tun0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A ufw-before-forward -o tap0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A ufw-before-forward -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A ufw-before-forward -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT

Save and exit.

And last thing - we need to enable IP-forwarding feature. Open in terminal file sysctl.conf -

sudo gedit /etc/sysctl.conf 

And add this line in the bottom -

# Enable IP forwarding
net.ipv4.ip_forward = 1 

Save and exit. After that apply the changes by running that command in terminal -

sudo sysctl -p

That`s it!

Now reboot, connect to your VPN-server and check youtube or P2P-sharing.

Solution 2

If you can’t laod your email and/or web pages get stuck when you’re connected to VPN server, that usually means you have an MTU issue. Each internet connection has a property called the Maximum Transmission Unit, or MTU. The MTU specifies the size of the largest chunk of data that can flow over that connection.

Most of the time the operating systems automatically detect the MTU of the connection and adjust themselves appropriately. However, some locations have routers that confuse the MTU discovery algorithms. To the best of my knowledge, Ubuntu has fixed MTU settings for VPN connections, which causes problems with some routers.

Here is the easy way to adjust the mtu size manually:

sudo nano /etc/ppp/ip-up

Add this line to the end of the file:

ifconfig $1 mtu 1492

Hope it could solve the problem

Share:
5,657

Related videos on Youtube

Ejaz
Author by

Ejaz

Updated on September 18, 2022

Comments

  • Ejaz
    Ejaz over 1 year

    So I've a PureVPN connection working great in Windows. But when I try to use it in latest Ubuntu 14.04.1 LTS, it

    1. Using PPTP, connects for a minute, offers no internet service, and then disconnects
    2. Using OpenVPN, connects but is EXTREMELY slow
    3. Using SSTP, connects but is EXTREMELY slow

    I tried contacting PureVPN support and all they offered me to toggle different settings, switch servers, try TCP or UDP in OpenVPN and see if things get better; which all sound like not-so-great tech support of a VPN company. They seemed like just trying to get through the chat session.

    I've tried numerous solutions found online but none worked. I've tried command line configuration and GUI cofiguration, none worked. The only thing holding me back from completely switching to Ubuntu is this VPN issue. I hope it'll get it resolved using stackexchange's amazing communities help :) I know this is not an active site like stackoverflow but I'm still asking (which shows the level of desperation I'm having LOL)

    P.S. I'm not a regular Linux user (trying to switch from windows)

  • Ejaz
    Ejaz over 9 years
    Actually now that I've tested the VPN connection for a some hours, it seems to have gotten better after the fix you suggested. It is not as perfect as it should be (and is in Windows) but it is not completely useless either. Thanks for the solution once again :)
  • Ejaz
    Ejaz over 7 years
    Ok, I'm back now with Ubuntu 16.04 LTS an guess what, this solution works perfectly! Thanks a ton. I'm using PureVPN OpenVPN and getting great speed.