Coder Social home page Coder Social logo

Comments (7)

lkundrak avatar lkundrak commented on August 17, 2024

Yeah, that's because we don't parse /remote/fortisslvpn or /remote/fortisslvpn_xml yet. :(

from openfortivpn.

lkundrak avatar lkundrak commented on August 17, 2024

Please let me know if https://github.com/lkundrak/openfortivpn/tree/split-vpn works for you.

from openfortivpn.

jjamor avatar jjamor commented on August 17, 2024

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.

lkundrak avatar lkundrak commented on August 17, 2024

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.

lkundrak avatar lkundrak commented on August 17, 2024

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.

jjamor avatar jjamor commented on August 17, 2024

@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.

jjamor avatar jjamor commented on August 17, 2024

Verified in upstream adrienverge/openfortivpn

Many thanks!

from openfortivpn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.