User Tools

Site Tools


networking:mikrotik:split_tunnel_01

This is an old revision of the document!


Split tunnel - Powershell cmdlet

Powershell has a cmdlet available that adds routes on VPN connection and removes them again when the VPN is disconnected: <fc #ff0000>Add-VpnConnectionRoute</fc>. It works without having to specify the interface ID.

The basic syntax is like this:

Add-VpnConnectionRoute -ConnectionName "VPN Connection Name" -DestinationPrefix 10.0.0.0/16

After entering this command, the routes will be created/removed automatically on connection/disconnection of the VPN.

https://docs.microsoft.com/en-us/powershell/module/vpnclient/add-vpnconnectionroute?view=win10-ps

networking/mikrotik/split_tunnel_01.1586597909.txt.gz · Last modified: 2020/04/11 09:38 by rplecko