Question

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.

Hi,

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 192.168.1.1. 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 192.168.1.1

I hope it helps.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.