I want to use a vpn connection on my Debian server but I get disconnected from ssh if I connect to the vpn. I thought by using the "ip route add" I can prevent getting disconnected from my server and it will continue to use the main connection for communication between my computer and the server, and the vpn for communication with other ips.
This is the command I use
ip route add PUBLICHOMEIP via PUBLICSERVERIP
But I get disconnected after the "ip route add" command too. Am I making a mistake anywhere?