Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
forticlient ssl vpn split tunnel fix for mac os el capitan(need to be made executable and run as sudo every time you connect to the vpn)
default_line=$(netstat -rn |grep default)
gateway=$(echo $default_line | awk '{print $2}')
interface=$(echo $default_line | awk '{print $6}')
echo $gateway
echo $interface
scutil <<EOF
get State:/Network/Service/forticlientsslvpn/IPv4
d.add InterfaceName ppp0
set State:/Network/Service/forticlientsslvpn/IPv4
route delete default
route delete -ifscope $interface default
route add -ifscope $interface default $gateway
route add -net -interface $interface

This comment has been minimized.

Copy link

@savo92 savo92 commented Apr 6, 2016

You got an extra % at the end of the last row. Removing it from the script works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.