Comments (7)
Yeah, that's because we don't parse /remote/fortisslvpn or /remote/fortisslvpn_xml yet. :(
from openfortivpn.
Please let me know if https://github.com/lkundrak/openfortivpn/tree/split-vpn works for you.
from openfortivpn.
Hi @lkundrak just compiled and tested. Offered routes apparently ignored...
Using FortiOS 4.0 MR3 Patch 12.
A sample session with debug flag (connect and then CTRL-C for disconnect):
sudo openfortivpn -vvv
DEBUG: Loaded config file "/etc/openfortivpn/config".
VPN account password:
DEBUG: Config host = "mygateway"
DEBUG: Config port = "443"
DEBUG: Config username = "myuser"
DEBUG: Config password = "********"
DEBUG: Gateway certificate validation failed.
DEBUG: Gateway certificate digest found in white list.
INFO: Connected to gateway.
INFO: Authenticated.
DEBUG: Cookie: SVPNCOOKIE=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
INFO: Remote gateway has allocated a VPN.
DEBUG: Gateway certificate validation failed.
DEBUG: Gateway certificate digest found in white list.
WARN: No gateway address
DEBUG: ssl_write_thread
DEBUG: ssl_read_thread
DEBUG: pppd_read_thread
DEBUG: if_config thread
DEBUG: pppd ---> gateway (16 bytes)
...
...
INFO: Got addresses: [172.29.1.66], ns [172.29.0.20, 172.29.0.29]
...
INFO: Got addresses: [172.29.1.66], ns [172.29.0.20, 172.29.0.29]
...
INFO: Got addresses: [172.29.1.66], ns [172.29.0.20, 172.29.0.29]
...
DEBUG: if_config: not ready yet...
INFO: Interface ppp0 is UP.
INFO: Setting new routes...
DEBUG: ip route show to 0.0.0.0/0.0.0.0
DEBUG: Setting route to tunnel gateway...
DEBUG: ip route add to MyGatewayIP/255.255.255.255 via 172.16.34.1 dev wlan0
DEBUG: Deleting the current default route...
DEBUG: ip route del to 0.0.0.0/0.0.0.0 via 172.16.34.1 dev wlan0
DEBUG: Setting new default route...
DEBUG: ip route add to 0.0.0.0/0.0.0.0 dev ppp0
INFO: Adding VPN nameservers...
DEBUG: Adding "nameserver 172.29.0.20" and "nameserver 172.29.0.29" to /etc/resolv.conf.
INFO: Tunnel is up and running.
...
^CINFO: Cancelling threads...
INFO: Setting ppp interface down.
INFO: Restoring routes...
DEBUG: ip route del to 0.0.0.0/0.0.0.0 dev ppp0
DEBUG: ip route add to 0.0.0.0/0.0.0.0 via 172.16.34.1 dev wlan0
DEBUG: ip route del to 213.0.127.210/255.255.255.255 via 172.16.34.1 dev wlan0
INFO: Removing VPN nameservers...
DEBUG: Deleting "nameserver 172.29.0.20" from /etc/resolv.conf.
DEBUG: Deleting "nameserver 172.29.0.20" from /etc/resolv.conf.
DEBUG: Waiting for pppd to exit...
INFO: Terminated pppd.
INFO: Closed connection to gateway.
DEBUG: Gateway certificate validation failed.
DEBUG: Gateway certificate digest found in white list.
INFO: Logged out.
from openfortivpn.
Okay, so FortiOS 4 probably doesn't export the routes via /remote/fortisslvpn_xml resource and uses /remote/fortisslvpn only. Needs some more work.
from openfortivpn.
Another try: could you please see if the branch https://github.com/lkundrak/openfortivpn/tree/split-vpn-4 works for you? No FortiOS installation around I can test against, so I used a mockup.
from openfortivpn.
@lkundrak excellent! This branch works! Good job!
...
INFO: Interface ppp0 is UP.
INFO: Setting new routes...
DEBUG: ip route add to 192.168.8.0/255.255.255.0 via 172.29.1.66 dev ppp0
DEBUG: ip route add to 192.168.9.0/255.255.255.0 via 172.29.1.66 dev ppp0
DEBUG: ip route add to 192.168.4.0/255.255.255.0 via 172.29.1.66 dev ppp0
DEBUG: ip route add to 172.29.0.0/255.255.0.0 via 172.29.1.66 dev ppp0
DEBUG: ip route add to 172.29.1.64/255.255.255.224 via 172.29.1.66 dev ppp0
INFO: Adding VPN nameservers...
DEBUG: Adding "nameserver 172.29.0.20" and "nameserver 172.29.0.29" to /etc/resolv.conf.
INFO: Tunnel is up and running.
...
Many thanks!
from openfortivpn.
Verified in upstream adrienverge/openfortivpn
Many thanks!
from openfortivpn.
Related Issues (20)
- Empty cookie error after server upgrade from 7.2.7 to 7.2.8 HOT 10
- "Error writing to SSL connection" on FreeBSD HOT 1
- 405 Method Not Allowed HOT 1
- openfortivpn on MAC gets stuck HOT 6
- openfortivpn version 1.22.0
- Wrong value in the 'Accept-Encoding' header HOT 2
- openfortivpn version 1.22.1
- IPCP terminated by peer (conflicting remote IP address) HOT 8
- Explain OTP Flag HOT 1
- v1.20.3 on OpenWRT - Hughes Internet HOT 9
- Older macOS do not provide `vdprintf`: `Undefined symbols: "_vdprintf"` HOT 11
- openfortivpn 1.3.0 not working on ubuntu 24.04 HOT 1
- ERROR: SSL_connect: error:0A000126:SSL routines::unexpected eof while reading, Error happen randomly HOT 7
- Possibly caching issue ? pppd-ipparam
- set resolvectl domains at vpn-up HOT 2
- Cannot connect to Fortigate 7.4.4 SSLVPN "Error reading from SSL connection" HOT 1
- "Unsupported version of FortiClient" message HOT 4
- DNS resolution fails on Ubuntu 24.04 HOT 1
- Permission denied pppd HOT 3
- Dropped protocol specifier '.openfortivpn' from 'ppp0.openfortivpn'. Using 'ppp0' (ifindex=22). HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfortivpn.