2

I've been trying to install PureVPN using OpenVPN on my DigitalOcean VPS. I'm configuring the VPS using SSH.

However, when I start the VPN I get disconnected from my VPS and I can't log into it any more using SSH.

I've used this following tutorial before for setting up a privateinternetaccess VPN on my VPS before:

https://serverfault.com/questions/659955/allowing-ssh-on-a-server-with-an-active-openvpn-client

Answer summary:

ip rule add from x.x.x.x table 128
ip route add table 128 to y.y.y.y/y dev ethX
ip route add table 128 default via z.z.z.z

Where x.x.x.x is your public IP, y.y.y.y/y should be the subnet of your public IP address, ethX should be your public Ethernet interface, and z.z.z.z should be the default gateway.

This works fine when I try to connect to privateinternetaccess using OpenVPN.

However, when I do the same above steps for PureVPN, I get the following error:

RTNETLINK answers: File exists
Thu Aug 17 12:25:09 2017 ERROR: Linux route add command failed: external program exited with error status: 2

I feel that the the problem exists in my *.ovpn files.

Here's an example of my PureVPN config file:

client
dev tun
proto udp
remote cav1-ovpn-udp.pointtoserver.com 53
persist-key
persist-tun
ca ca.crt
tls-auth Wdc.key 1
cipher AES-256-CBC
comp-lzo
verb 1
mute 20
route-method exe
route-delay 2
route 0.0.0.0 0.0.0.0
auth-user-pass pass.txt
auth-retry interact
explicit-exit-notify 2
ifconfig-nowarn
auth-nocache

If I comment out the route 0.0.0.0 0.0.0.0 part, the connection goes through but then I can't access any site on the internet anymore. curl ifconfig.co times out without being able to return my VPN's IP.

I want to be able to connect to SSH to my VPS's public IP.

Here's my whole connection log:

root@open-vpn:/etc/openvpn# openvpn London2-udp.ovpn 
Thu Aug 17 12:38:27 2017 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Thu Aug 17 12:38:27 2017 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Thu Aug 17 12:38:27 2017 WARNING: file 'pass.txt' is group or others accessible
Thu Aug 17 12:38:27 2017 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Aug 17 12:38:27 2017 WARNING: file 'Wdc.key' is group or others accessible
Thu Aug 17 12:38:27 2017 Control Channel Authentication: using 'Wdc.key' as a OpenVPN static key file
Thu Aug 17 12:38:27 2017 UDPv4 link local (bound): [undef]
Thu Aug 17 12:38:27 2017 UDPv4 link remote: [AF_INET]172.94.3.130:53
Thu Aug 17 12:38:28 2017 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1558', remote='link-mtu 64858'
Thu Aug 17 12:38:28 2017 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 64800'
Thu Aug 17 12:38:28 2017 [PureVPN] Peer Connection Initiated with [AF_INET]172.94.3.130:53
Thu Aug 17 12:38:31 2017 TUN/TAP device tun0 opened
Thu Aug 17 12:38:31 2017 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Aug 17 12:38:31 2017 /sbin/ip link set dev tun0 up mtu 1500
Thu Aug 17 12:38:31 2017 /sbin/ip addr add dev tun0 local 172.94.3.242 peer 172.94.3.241
RTNETLINK answers: File exists
Thu Aug 17 12:38:33 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Aug 17 12:38:33 2017 Initialization Sequence Completed

How can I get the same result with PureVPN?

6
  • PureVPN is a commercial product, why don't you ask their support?
    – Fabby
    Aug 22 '17 at 8:54
  • But i'm accessing it using OpenVPN. I've been able to achieve the same thing on privateinternetaccess by adding ip routes. I want to know why its not working here. And if there is a setting i can change to achieve it here again.
    – MetalloyD
    Aug 22 '17 at 9:19
  • Yes, that does seem to be the problem. Thanks for pointing it out :)
    – MetalloyD
    Aug 25 '17 at 15:28
  • So have you solved the problem yet?
    – deacs
    Apr 17 '18 at 17:12
0

is it vital that you can SSH into the machine? if not, try using the console directly:

https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-console-to-access-your-droplet

1
  • 1
    Yes, it kind of is important.
    – MetalloyD
    Aug 22 '17 at 10:35

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.