Skip to main content
fabio-C
New Member
April 28, 2022
Question

FortiClient VPN not connecting on Ubuntu: Backup routing table failed

  • April 28, 2022
  • 12 replies
  • 74369 views

Some debug info:

- sslvpn:739 Login successful

- main:1112 State: Configuring tunnel

- vpn_connection:1263 Backup routing table failed

- main:1412 Init

Things I tried: 
1- reinstall FortiClient
2- disable ufw firewall

How can I solve that?

Ubuntu 22
FortiClient free 7.0.0.0018

12 replies

Anthony_E
Staff
Staff
May 1, 2022

Hello fabio-C,

 

Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.

 

Thanks,

Best Regards
Anthony_E
Staff
Staff
May 1, 2022

Hello fabio-C,

 

I found this document:

 

https://docs.fortinet.com/document/forticlient/7.0.1/linux-release-notes/213138/install-forticlient-linux-from-repo-fortinet-com

 

Could you please tell me if it helped?

 

If not, we will find another solution to reply to your answer.

 

Regards,

Best Regards
Redtree
Visitor III
May 2, 2022

Hi,

 

i have the same error. 

I installed via deb file from download. The provided update server provide only lts versions. With latest update from 21.04 to 22.04 the tool stopped working.

 

sw2090
SuperUser
SuperUser
May 3, 2022

@Redtree 22.04 is also a LTS version of Ubuntu btw ;)

However there was a thread in hiere about installing FortiClient from .deb on a different but also debian based linux (I forgot about the name).

In this case it was unmet dependencies that prevented Forticlient .deb from being installed as some packages had been removed from the standard repositories. That could be workarounded by getting those packages from the debian buster repos and manually install them. After that FortiCLient was able to install and worked fine so far.

I would need to search for that thread.

 

And to the initial issue here: accoarding to the error thrown by FortiClient that could be permission issues. Since the routing table is not a physical file maybe it's an issue of apparmor being to restrictive. I ran into some similar issue in Ubuntu with Strongswan not being able to add the dns provided via mode_config to my resolve.conf due to too restrictive apparmor profile...

sw2090
SuperUser
SuperUser
May 3, 2022
zwen
Staff
Staff
May 5, 2022

Thanks for help! This works on my PC. I met the same issue on ubuntu 22.04 before (Backup routing table failed). After installing libindicator7, VPN connection succeeds.

sw2090
SuperUser
SuperUser
May 3, 2022

maybe looking not only at the logs of FortiClient but also into /var/log/syslog, /var/log/daemon.log or /var/log/messages might provide some clue on what fails here.

 

emilianoh
New Member
May 7, 2022

Hello, my solution was as follows:

https://kifarunix.com/install-forticlient-vpn-client-on-ubuntu-20-04-ubuntu-18-04/

I tried multiple options and it was the only one that worked for me.

Best regards

Redtree
Visitor III
May 9, 2022

Version 6.4.0.0851 works on Ubuntu 22.04 after installing libindicator7. The latest versions 7.0.0.18 doesn't work. Tried it with deb installation and with apt installation. 

omartinm
New Member
June 24, 2022

This is the solution that has worked in my case using ubuntu 22.04 and forticlient 7.0.3.

First, Forticlient tries to flush the DNS cache with the 'systemd-resolve' program which no longer exists in Ubuntu 22.04 (it has been replaced by 'resolvectl').
So we create a script '/usr/bin/systemd-resolve' with the following content:

 

#!/bin/bash

declare -a arguments

for i in "$@"; do
    arguments+=(${i:2})
done

resolvectl ${arguments[@]}
sleep 10

 

Forticlient executes the command 'systemd-resolve --flush-caches' which the script transforms into 'resolvectl flush-caches'. Without the final 'sleep' in my case it kept failing. With this most of the time the VPN connection works

nikhilsingh050
New Member
March 24, 2023

It worked for me but after a certain duration the internet stops working for few seconds. It keeps happening after a certain period. Looks like its happening because of the sleep.

alaniwi
Explorer
May 4, 2024

I find the same thing - it works but then every now and then the connection hangs. By adding some debug statements to the script (to dump various diagnostics to a log file), I was able to confirm that the times when the connection hangs are indeed when the script is being executed (every 2 minutes), and also, the script is executed by the same /opt/forticlient/vpn process every time -- both at the startup of the VPN connection (when the sleep is needed) and at later times (when it gets in the way).  I was able to modify omartinm's script so that the sleep is only executed if the script is run less than 1 minute after the start time of the parent process. This seems to have solved the problem.

 

!/bin/bash

declare -a arguments

get_start_t() {
    date -d "$(ps -o lstart= $1) " +%s
}
ppid=$(ps -o ppid= $$)
agediff=$(expr $(get_start_t $$) - $(get_start_t $ppid))

for i in "$@"; do
    arguments+=(${i:2})
done

resolvectl ${arguments[@]}

if [ $agediff -lt 60 ]

then
    sleep 10
fi

 

As a reminder, this needs to be installed as /usr/bin/systemd-resolve (with execute bit set).

 

I can't yet be sure whether some process other than forticlient might try to call the script, causing some kind of odd behaviour. So far so good, but if it arises, it might be possible to further adapt the script to detect the command line of the parent process, and do something different if it is not being called by /opt/forticlient/vpn .

jleonardovanegas
New Member
August 16, 2022

i have the same problem with an additional behavior, if i connect the pc to wifi via mobile usb tethering it works, but if i connect the pc direct to lan it did not work. none of the above suggestions have worked. Any ideas?

rmwiseman
New Member
September 8, 2022

Unfortunately, nothing here fixed the issue for me. I'm now on Mint 21 (based on Ubuntu 22.04) and I've already got the latest version of Forticlient VPN and the latest versions of libappindicator1 and libindicator7. I've reinstalled all three, but it still won't connect. "vpn_connection:1263 Backup routing table failed" is the error I keep getting.  Any ideas?

 

UPDATE: Since writing the above, I've now come into the office and am on a different WiFi network, and when I woke my computer, FortiClient connected!  I've no idea what's different on this network, but it always used to work on the other one too.  I'll see if it reconnects when I'm next online at home.