adrienverge / openfortivpn

Client for PPP+TLS VPN tunnel services
GNU General Public License v3.0
2.72k stars 323 forks source link

Route hosts through VPN #1163

Closed jorgeluislazo closed 12 months ago

jorgeluislazo commented 1 year ago

Hi,

Is there a way to replicate VPN slice behaviour for openconnect in which a hostname is passed to fortivpn and any traffic to that hostname will be routed via the VPN?

I am connected to a VPN that by default only acts on certain subnets, I want to add IPs to the default config setup by the VPN (and since they are a range of IPs and may change, I'd like to do it via hostname value).

DimitriPapadopoulos commented 12 months ago

You could have a script do that for you.

Right now, openfoprtivpn does not call an external script, although I would very much like it to defer routing and DNS changes to an external script such as vpnc-script or vpn-slice. So your only option would be to add such a script under ip-up / ip-down.