On my research list: finding out how to prevent FortiClient to route all traffic over VPN
Posted by jpluimers on 2020/08/10
Links that will likely help me:
- https://docs.fortinet.com/d/forticlient-5.4.1-xml-reference/download
- [WayBack] FortiClient-5.4.1-XML-Reference.pdf
- [WayBack] FortiClient VPN Problems With OSX 10.11 El Capitan | Fortinet Technical Discussion Forums
- [WayBack] macos – How to selectively route network traffic through VPN on Mac OS X Leopard? – Super User
- [WayBack] vpn – How to get forticlient working in OSX El Capitan – Server Fault
- [WayBack] Set no default route for VPN Client via PPTP/L2TP – Mac OS X Hints
- [WayBack] Routing all remote traffic through the VPN tunnel
–jeroen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 | |
d.init | |
get State:/Network/Service/forticlientsslvpn/IPv4 | |
d.add InterfaceName ppp0 | |
set State:/Network/Service/forticlientsslvpn/IPv4 | |
EOF | |
route delete default | |
route delete -ifscope $interface default | |
route add -ifscope $interface default $gateway | |
route add -net 0.0.0.0 -interface $interface |
Leave a comment