How do I connect to the VPN from a remote server

    If you attempt to connect to the VPN from a server that you are remotely connected to, you will lose the connection to the server as soon as the VPN connects. This is because the VPN server pushes a new default route that sends the return traffic through the VPN. To prevent this, you’ll need to edit the OpenVPN config file for the server you are connecting to and add the line below:

    route A.B.C.D 255.255.255.255 net_gateway
    

    where A.B.C.D is the IP address of the device you are connecting from.

    If you don’t want to route all traffic through the VPN you can reject the default route pushed by the server by adding the directive below to the config file. You will then need to add your own static routes for the addresses you do want to route through the VPN.

    route-nopull
    


    Related Articles

    Still have questions?

    Get in touch and we'll get back to you in a few hours.

    Contact support

    Interested in privacy?

    Read our latest privacy news and keep up-to-date on IVPN services.

    Visit IVPN Blog
    Spotted a mistake or have an idea on how to improve this page?
    Suggest an edit on GitHub.