Hot!How to connect to IPsec VPN in Ubuntu Server 18.04

Author
eng
New Member
  • Total Posts : 7
  • Scores: 0
  • Reward points: 0
  • Joined: 2020/05/27 05:25:34
  • Status: offline
2020/05/28 09:35:25 (permalink)
0

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
#1

3 Replies Related Threads

    eng
    New Member
    • Total Posts : 7
    • Scores: 0
    • Reward points: 0
    • Joined: 2020/05/27 05:25:34
    • Status: offline
    Re: How to connect to IPsec VPN in Ubuntu Server 18.04 2020/05/29 05:03:48 (permalink)
    0
    Ok - I managed to do it after a lot of perseverance and effort! I'll post my answer soon for future visitors.
    #2
    eng
    New Member
    • Total Posts : 7
    • Scores: 0
    • Reward points: 0
    • Joined: 2020/05/27 05:25:34
    • Status: offline
    Re: How to connect to IPsec VPN in Ubuntu Server 18.04 2020/05/29 06:22:40 (permalink)
    0
    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 :)
    post edited by eng - 2020/05/29 06:41:20
    #3
    sw2090
    Platinum Member
    • Total Posts : 678
    • Scores: 42
    • Reward points: 0
    • Joined: 2017/06/14 01:27:25
    • Location: Regensburg
    • Status: offline
    Re: How to connect to IPsec VPN in Ubuntu Server 18.04 2020/06/02 03:14:10 (permalink)
    0
    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.
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 5.5