1

I am trying to bring up VPN using Openswan (version 5.6.2) on an Ubuntu machine.

But when I initiate the following command, it says "missing configuration name":

sudo swanctl --initiate vpn-name
initiate failed: missing configuration name

This is the output of IPSEC Statusall command:

sudo ipsec statusall
Status of IKE charon daemon (strongSwan 5.6.2, Linux 5.3.0-1032-aws, x86_64):
uptime: 11 hours, since Aug 07 14:43:36 2020
malloc: sbrk 2568192, mmap 0, used 550784, free 2017408
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 0
loaded plugins: charon aesni aes rc2 sha2 sha1 md4 md5 mgf1 random nonce x509 revocation constraints 
pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl fips-prf gmp agent xcbc hmac gcm attr kernel-netlink resolve socket-default connmark stroke vici updown eap-mschapv2 xauth-generic counters
Listening IP addresses:
  172.X.Y.Z
  172.X.0.X
Connections:
Security Associations (0 up, 0 connecting):
  none

The following is the config for /etc/ipsec.conf

cat /etc/ipsec.conf
# ipsec.conf - strongSwan IPsec configuration file

# basic configuration

config setup
        strictcrlpolicy=no
        uniqueids = yes
        charondebug="all"
        #nat_traversal=yes
        # strictcrlpolicy=yes
        # uniqueids = no

# Add connections here.

# Sample VPN connections

conn vpn-name

      type=tunnel
      keyexchange=ikev2
      authby=secret
      #leftid=172.x.x.x
      #Left is me
      left=3.x.x.x
      leftsubnet=172.32.X.X
      #leftsubnet=10.1.4.0/16
      #right is MTN CIV
      right=19.X.X.X
      rightsubnet=10.18.X.0/24
      ike=3des-sha1,aes256-sha1,aes128-sha1!
      esp=3des-sha1,aes256-sha1
      auto=route
      lifetime=8h
      dpddelay=30
      dpdtimeout=120
      dpdaction=restart
      auto=start
Zanna
  • 3,491
  • 18
  • 28
sach2000
  • 11
  • 1

1 Answers1

0

swanctl is a new, portable command line utility to configure, control and monitor the IKE daemon charon using the vici interface. It has been introduced with strongSwan 5.2.0.

swanctl works independently from starter, ipsec.conf or the ipsec script, and is a lightweight alternative available on all platforms.

swanctl is to be used once you have configured /etc/swanctl/swanctl.conf.

If you have configured the older ipsec.conf, you need to start the connection with:

sudo ipsec up vpn-name
paradroid
  • 1,159
  • 1
  • 13
  • 28