Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
eng
New Contributor II

How to connect to IPsec VPN in Ubuntu Server 18.04

Hello,

 

I've been trying to connect to my VPN using an Ubuntu Server today, but I can't seem to be able to get it working. A lot of the advice I found online either didn't work or was outdated. 

 

Does anyone know of a Step by Step guide which actually works?

 

Thanks

4 REPLIES 4
eng
New Contributor II

Ok - I managed to do it after a lot of perseverance and effort! I'll post my answer soon for future visitors.

eng
New Contributor II

Here's how I managed to do it:

 

cat /etc/ipsec.conf


config setup
        # strictcrlpolicy=yes
        # uniqueids = no
        charondebug="dmn 2, mgr 2, ike 2, chd 2, job 2, cfg 2, knl 2, net 2, enc2, lib 2"

conn ug_vpn
    fragmentation = yes
    keyexchange = ikev1
    aggressive = yes
    reauth = yes
    forceencaps = no
    mobike = no
    rekey = yes
    installpolicy = yes
    type = tunnel
    #type = passthrough
    dpdaction = restart
    dpddelay = 10s
    dpdtimeout = 60s
    ikelifetime = 14400s
    lifetime = 3600s

    auto=start
    dpdaction=hold
    closeaction=hold

    left = %defaultroute
    leftauth = psk
    leftauth2 = xauth
    leftsourceip = %config
    leftid = %<MY_LOCALID>
    xauth_identity=<MY_USERNAME>
    right = <MY_FORTIGATE_IP>
    rightid = %<MY_LOCALID>
    # route all trafic via this tunnel
    rightsubnet = 0.0.0.0/0
    rightauth = psk

    ike=aes128-sha1-modp1536!
    esp=aes128-sha1-modp1536!

 

cat /etc/ipsec.secrets

 

<MY_USERNAME> : XAUTH "<MY_PASSWORD>"
<MY_USERNAME> <MY_FORTIGATE_IP> : PSK "<MY_SECRET_KEY>"

 

ipsec up ug_vpn

 

I hope this helps somebody :)

sw2090

thanks so far. I am interested in this too. Thus I'd like to addidionally have support for split tunneling.

But might give it some try if I find the time to.

-- 

"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams

-- "It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
shehab
New Contributor III

Do you mean installing Forticlient on Ubuntu?

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors