1

I have strongswan setup with a couple of connections in a Centos 7 box. When I do strongswan restart --debug-all it shows me that it's restarting the service and includes the connections in the output.

[root@RFXH001 ~]# strongswan restart --debug-all Stopping strongSwan IPsec... Starting strongSwan 5.6.1 IPsec [starter]... Loading config setup charondebug=all Loading conn 'vodacom_smpp' esp=aes128-sha1! ike=aes128-sha1-mopd1536! left=xxx.xxx.xxx.xxx leftfirewall=yes leftsubnet=xxx.xxx.xxx.xxx./xx right=xxx.xxx.xxx.xxx rightsubnet=xxx.xxx.xxx.xxx./xx authby=secret auto=add dpdaction=restart dpddelay=10 dpdtimeout=120 ikelifetime=24h keyexchange=ikev1 keyingtries=1 keylife=1h rekey=yes rekeymargin=3m type=tunnel Loading conn 'vodacom_ussd' esp=aes128-sha1! ike=aes128-sha1-mopd1536! left=xxx.xxx.xxx.xxx leftfirewall=yes leftsubnet=xxx.xxx.xxx.xxx/xx right=xxx.xxx.xxx.xxx rightsubnet=xxx.xxx.xxx.xxx/xx authby=secret auto=add dpdaction=restart dpddelay=10 dpdtimeout=120 ikelifetime=24h keyexchange=ikev1 keyingtries=1 keylife=1h rekey=yes rekeymargin=3m type=tunnel found netkey IPsec stack

But when I do strongswan statusall it says it has 0 connections, and when I try to up/down/route any of those connections by name it says no config named 'name-of-connection'

[root@RFXH001 ~]# strongswan statusall Status of IKE charon daemon (strongSwan 5.6.1, Linux 3.10.0-514.6.1.el7.x86_64, x86_64): uptime: 107 seconds, since Apr 15 15:15:32 2018 malloc: sbrk 1622016, mmap 0, used 555440, free 1066576 worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 0 loaded plugins: charon pkcs11 tpm aesni aes des rc2 sha2 sha1 md4 md5 mgf1 random nonce x509 revocation constraints acert pubkey pkcs1 pkcs8 pkcs12 pgp dnskey sshkey pem openssl gcrypt fips-prf gmp curve25519 chapoly xcbc cmac hmac ctr ccm gcm curl attr kernel-netlink resolve socket-default farp stroke vici updown eap-identity eap-sim eap-aka eap-aka-3gpp eap-aka-3gpp2 eap-md5 eap-gtc eap-mschapv2 eap-dynamic eap-tls eap-ttls eap-peap xauth-generic xauth-eap xauth-pam xauth-noauth dhcp led duplicheck unity counters Listening IP addresses: xxx.xxx.xxx.xxx Connections: Security Associations (0 up, 0 connecting): none

[root@RFXH001 ~]# strongswan up vodacom_smpp no config named 'vodacom_smpp'

Have you ever had this issue? And how did you go around it?

Relevant configs

charon {
    load_modular = yes
    duplicheck.enable = no
    install_routes = yes
    compress = yes
    plugins {
            include strongswan.d/charon/*.conf
    }

    # two defined loggers
    filelog {
            /var/log/charon.log {
                    time_format = %b %e %T
                    ike_name = yes
                    append = no
                    default = 0
                    flush_line = yes
            }
            stderr {
                    ike = 2
                    knl = 3
            }
    }

    syslog {
            identifier = charon-custom
            daemon {
            }
            auth {
                    default = -1
                    ike = 0
            }
    }
}

include strongswan.d/*.conf
11
  • I've edited the description as to include the details Apr 15 '18 at 15:19
  • Thanks, Paulo. Does Vodacom not block IPsec? Vodafone used to block it here in the past. Apr 15 '18 at 15:20
  • 1
    No. I've used this very setup 4 times before with success. The only thing that is different this time is I'm using Centos where before I was using Ubuntu. Also, I think that at least I should be able to reference the connections by name and have them be recognized by the service even if I cannot establish them. Apr 15 '18 at 15:22
  • Does restarting ipsec from the command line fixes this? (try it) Apr 15 '18 at 21:04
  • 1
    So I had written mopd instead of modp and that is why it wasn't working. After the change, restarting adds and lists the connections. Thanks so much for the help Apr 16 '18 at 11:46
0

So I had a typo in the connection configure, I had written mopd instead of modp. After the change that, restarting the service added the connections and listed them.

Thanks so much for the help

Not the answer you're looking for? Browse other questions tagged or ask your own question.