# FortiClient SSLVPN cannot set routes

## Dachnaz

Hi all,

I'm trying to connect to my SSLVPN using FortiClient 4.0. It works well in Windows (did I just say that? :X), and will connect and open the tunnel in Gentoo, but never sets the ppp0 interface up. While my Internet connection continues functioning as if it were not tunneled, if I use 

```
# route
```

 the table prints the header and nothing else, and the terminal locks and does not return to prompt until the FortiClient process is killed. When the process dies, the route table finishes printing, returning the default route for my non-tunneled lan connection. Works no better when run as root, same effect on wlan and ethernet.

Thoughts?

Thanks!

Dachnaz

----------

## Hu

A hang when trying to print the routes might be a DNS stall, but sounds more like a bug.  I do not see anything like this client in Portage.  What overlay provides this?  What files does it install?

----------

## Dachnaz

It's in flavour (layman). It installs the binary FortiClient to /opt/forticlient-sslvpn, along with a couple scripts there in helper/ .

Thanks for the tip on the DNS stall. It looks like the client calls /etc/ppp/ip-up so I'll poke around in the ip-up.d scripts to see what's going on. There is one called 40-dns.sh, hmm.

----------

## Dachnaz

Figured it out, thanks to your tips.

Forticlient-SSLVPN uses a script in /opt/forticlient-sslvpn/helper/sysconfig.linux.sh which uses improper syntax while running an ifconfig command to set a gateway. Change line 64 to 

```
addr=`ifconfig $ifn |grep "inet"|awk ' {print $2 }'`
```

and you're good to go.

----------

## khayyam

 *Dachnaz wrote:*   

> 
> 
> ```
> addr=`ifconfig $ifn |grep "inet"|awk ' {print $2 }'`
> ```
> ...

 

Dachnaz ... alternately ...

```
addr=`ifconfig $ifn |awk '/inet/{split($2,ip,":"); print ip[2]}'`
```

... or using iproute2 ...

```
addr=`ip addr show $ifn |awk '/inet/{split($2,ip,"/"); print ip[1]}'`
```

... or, using bash exclusively ...

```
addr=$(ip addr show $ifn |{read r ; read r ; read r a r ; echo ${a%/*}})
```

... my perfered for such things is zsh (though obviously this isn't useful in the above)

```
addr=${$(ip -o -4 addr show $ifn)[4]:h}
```

best ... khay

----------

