ivpn / desktop-app

Official IVPN Desktop app
https://www.ivpn.net/apps/
GNU General Public License v3.0
368 stars 50 forks source link

Run along with Tailscale #215

Open r3nor opened 2 years ago

r3nor commented 2 years ago

Feature request

Description

I use tailscale to connect to my own home network services from the outside. I would like to be able to run both Tailscale and IVPN on my Linux desktop (and if possible in android would be awesome). Right now, I can only connect to either one or the other.

Describe the solution

I would like to be able to connect to both at the same time. In fact this issue should be something exactly like this:

https://github.com/tailscale/tailscale/issues/2880

Note that this issue is of big interest, as it has more than 100 reactions from people. Finally another interesing feature would be Split tunneling based on domain names/IP addresses

jordan-ivpn commented 2 years ago

@r3nor This might offer a solution until the IVPN App supports domain names/IP addresses in the split tunnel.

In the IVPN App's Settings > IVPN Firewall area, there is an option to exclude IP addresses and subnets. Add an exception or exceptions for the IP addresses or subnets Tailscale makes use of, then add a static route or routes to your system for the Tailscale network(s).

After adding the exclusion to the IVPN App's firewall, the next step is to identify your local gateway. This is often your local network router. For the examples below, the gateway is a.b.c.d and the excluded subnet is 192.168.100.0/24; the subnet or subnets for the Tailscale connection will likely be different. Finally, open a Command Prompt (Windows admin) or Terminal (macOS/Linux) and run a command to add the static route:

Windows:

route ADD 192.168.100.0 MASK 255.255.255.0 a.b.c.d

macOS:

sudo route -n add -net 192.168.100.0 a.b.c.d 255.255.255.0

Linux:

sudo ip route add 192.168.100.0/24 via a.b.c.d

For a single host, use mask = 255.255.255.255 (Windows and macOS) or /32 (Linux).

Note: These static routes will likely have to be added after each reboot, though it is likely possible to make the route permanent.