When I connect to a VPN I am unable to reach my server

I am connecting vía openfortivpn to a fortinet VPN and after I am able to connect to the VPN, I get kicked off the ssh connection and I am not able to access my site vía http either.

The only way is to reboot my server to gain access again, because on reboot it will drop the VPN connection.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


It looks like all your network traffic going outside is sent through VPN server/gateway, when your VPN connection is established. Then, I would consider one of two solutions:

1. If you are an admin of Fortinet VPN server/gateway, you can change the VPN configuration. I believe it is possible to configure routing in the way that the traffic addressed to VPN network goes through VPN server, and the rest of the outside traffic is sent through your default Internet gateway. Unfortunately, I am not familiar with Fortinet products, so I cannot help you with such configuration. I believe there are the dedicated forums for Fortinet products, where you can get an advice.

2. You can add the static routes to the servers you want to get to when VPN connection is established. However, I cannot recommend this solution, if you work from different places using different ISPs.

For example. You work from home and you connect to the Internet through your home ISP’s router that has got an IP address You would like to have an access to your droplet, holding an IP address 111.222.333.444, after VPN connection is establihed. The command to add a static route to this droplet in Ubuntu would look like:

sudo ip route add 111.222.333.444/32 via

I hope it helps.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel