0

I am currently working on setting up an IKEv2 VPN server with strongswan. I am working on a Mac running v10.11.16 (El Capitan). I have been referencing the following tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ikev2-vpn-server-with-strongswan-on-ubuntu-16-04

I have run into issues with Step 4 of the tutorial. It seems that when I install strongswan using homebrew, the configuration files are not ending up in my etc/ folder, as they are supposed to. In fact, I can't seem to locate them anywhere on my machine. When I look in my /usr/local/opt directory, there is no etc directory included. It seems that my config files for strongswan are AWOL. Any ideas on where brew could be putting them?

  • I voted to close this question because the tutorial is for installing in Ubuntu, and the premises of this question are entirely wrong. MacOS is neither Linux nor Ubuntu. – Rui F Ribeiro Feb 26 '18 at 20:43
1

If you've installed brew and strongswan to the default locations the standard "brew" etc location is /usr/local/etc/.

The folder contains all folders and sub-folders required by strongswan/ipsec etc.

Entering ls -Ral /usr/local/etc should reveal something like (slightly redacted by me to omit my user name and some unrelated folders were removed from the output):

total 40
drwxr-xr-x  12 user  admin  -  408 27 Feb 02:36 .
drwxrwxr-x  19 user  admin  -  646  7 Mär  2017 ..
-rw-r--r--   1 user  admin  -  608 27 Feb 02:36 ipsec.conf
drwxr-xr-x  10 user  admin  -  340 27 Feb 02:36 ipsec.d
-rw-------   1 user  admin  -   48 27 Feb 02:36 ipsec.secrets
drwxr-xr-x   7 user  admin  -  238 18 Dez 05:13 openssl
-rw-r--r--   1 user  admin  -  281 27 Feb 02:36 strongswan.conf
drwxr-xr-x   9 user  admin  -  306 27 Feb 02:36 strongswan.d
drwxr-xr-x  17 user  admin  -  578 27 Feb 02:36 swanctl

/usr/local/etc/ipsec.d:
total 0
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 .
drwxr-xr-x  12 user  admin  - 408 27 Feb 02:36 ..
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 aacerts
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 acerts
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 cacerts
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 certs
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 crls
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 ocspcerts
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 private
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 reqs

/usr/local/etc/ipsec.d/aacerts:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/acerts:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/cacerts:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/certs:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/crls:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/ocspcerts:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/private:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/ipsec.d/reqs:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  10 user  admin  - 340 27 Feb 02:36 ..

/usr/local/etc/openssl:
total 568
drwxr-xr-x   7 user  admin  -    238 18 Dez 05:13 .
drwxr-xr-x  12 user  admin  -    408 27 Feb 02:36 ..
-rw-r--r--   1 user  admin  - 275049 18 Dez 05:13 cert.pem
drwxr-xr-x   2 user  admin  -     68  6 Aug  2016 certs
drwxr-xr-x  11 user  admin  -    374 14 Nov 16:29 misc
-rw-r--r--   1 user  admin  -  10835 18 Dez 05:12 openssl.cnf
drwxr-xr-x   2 user  admin  -     68  6 Aug  2016 private

/usr/local/etc/openssl/certs:
total 0
drwxr-xr-x  2 user  admin  -  68  6 Aug  2016 .
drwxr-xr-x  7 user  admin  - 238 18 Dez 05:13 ..

/usr/local/etc/openssl/misc:
total 112
drwxr-xr-x  11 user  admin  -  374 14 Nov 16:29 .
drwxr-xr-x   7 user  admin  -  238 18 Dez 05:13 ..
-rwxr-xr-x   1 user  admin  - 5679  6 Aug  2016 CA.pl
-rwxr-xr-x   1 user  admin  - 5688 18 Dez 05:12 CA.pl.default
-rwxr-xr-x   1 user  admin  - 5175 18 Dez 05:12 CA.sh
-rwxr-xr-x   1 user  admin  -  119 18 Dez 05:12 c_hash
-rwxr-xr-x   1 user  admin  -  152 18 Dez 05:12 c_info
-rwxr-xr-x   1 user  admin  -  112 18 Dez 05:12 c_issuer
-rwxr-xr-x   1 user  admin  -  110 18 Dez 05:12 c_name
-rwxr-xr-x   1 user  admin  - 6419  5 Jun  2017 tsget
-rwxr-xr-x   1 user  admin  - 6384 18 Dez 05:12 tsget.default

/usr/local/etc/openssl/private:
total 0
drwxr-xr-x  2 user  admin  -  68  6 Aug  2016 .
drwxr-xr-x  7 user  admin  - 238 18 Dez 05:13 ..

/usr/local/etc/strongswan.d:
total 64
drwxr-xr-x   9 user  admin  -   306 27 Feb 02:36 .
drwxr-xr-x  12 user  admin  -   408 27 Feb 02:36 ..
drwxr-xr-x  29 user  admin  -   986 27 Feb 02:36 charon
-rw-r--r--   1 user  admin  -  1792 27 Feb 02:36 charon-logging.conf
-rw-r--r--   1 user  admin  - 10794 27 Feb 02:36 charon.conf
-rw-r--r--   1 user  admin  -    65 27 Feb 02:36 pki.conf
-rw-r--r--   1 user  admin  -    79 27 Feb 02:36 scepclient.conf
-rw-r--r--   1 user  admin  -   173 27 Feb 02:36 starter.conf
-rw-r--r--   1 user  admin  -   151 27 Feb 02:36 swanctl.conf

/usr/local/etc/strongswan.d/charon:
total 216
drwxr-xr-x  29 user  admin  - 986 27 Feb 02:36 .
drwxr-xr-x   9 user  admin  - 306 27 Feb 02:36 ..
-rw-r--r--   1 user  admin  - 138 27 Feb 02:36 constraints.conf
-rw-r--r--   1 user  admin  - 135 27 Feb 02:36 counters.conf
-rw-r--r--   1 user  admin  - 278 27 Feb 02:36 curl.conf
-rw-r--r--   1 user  admin  - 137 27 Feb 02:36 curve25519.conf
-rw-r--r--   1 user  admin  - 215 27 Feb 02:36 eap-gtc.conf
-rw-r--r--   1 user  admin  - 139 27 Feb 02:36 eap-identity.conf
-rw-r--r--   1 user  admin  - 134 27 Feb 02:36 eap-md5.conf
-rw-r--r--   1 user  admin  - 139 27 Feb 02:36 eap-mschapv2.conf
-rw-r--r--   1 user  admin  - 245 27 Feb 02:36 kernel-pfkey.conf
-rw-r--r--   1 user  admin  - 255 27 Feb 02:36 kernel-pfroute.conf
-rw-r--r--   1 user  admin  - 132 27 Feb 02:36 nonce.conf
-rw-r--r--   1 user  admin  - 301 27 Feb 02:36 openssl.conf
-rw-r--r--   1 user  admin  - 248 27 Feb 02:36 osx-attr.conf
-rw-r--r--   1 user  admin  - 130 27 Feb 02:36 pem.conf
-rw-r--r--   1 user  admin  - 130 27 Feb 02:36 pgp.conf
-rw-r--r--   1 user  admin  - 132 27 Feb 02:36 pkcs1.conf
-rw-r--r--   1 user  admin  - 132 27 Feb 02:36 pkcs8.conf
-rw-r--r--   1 user  admin  - 133 27 Feb 02:36 pubkey.conf
-rw-r--r--   1 user  admin  - 283 27 Feb 02:36 revocation.conf
-rw-r--r--   1 user  admin  - 491 27 Feb 02:36 socket-default.conf
-rw-r--r--   1 user  admin  - 133 27 Feb 02:36 sshkey.conf
-rw-r--r--   1 user  admin  - 986 27 Feb 02:36 stroke.conf
-rw-r--r--   1 user  admin  - 132 27 Feb 02:36 unity.conf
-rw-r--r--   1 user  admin  - 297 27 Feb 02:36 updown.conf
-rw-r--r--   1 user  admin  - 221 27 Feb 02:36 vici.conf
-rw-r--r--   1 user  admin  - 131 27 Feb 02:36 x509.conf
-rw-r--r--   1 user  admin  - 140 27 Feb 02:36 xauth-generic.conf

/usr/local/etc/swanctl:
total 32
drwxr-xr-x  17 user  admin  -   578 27 Feb 02:36 .
drwxr-xr-x  12 user  admin  -   408 27 Feb 02:36 ..
drwxr-x---   2 user  admin  -    68 27 Feb 02:36 bliss
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 conf.d
drwxr-x---   2 user  admin  -    68 27 Feb 02:36 ecdsa
drwxr-x---   2 user  admin  -    68 27 Feb 02:36 pkcs12
drwxr-x---   2 user  admin  -    68 27 Feb 02:36 pkcs8
drwxr-x---   2 user  admin  -    68 27 Feb 02:36 private
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 pubkey
drwxr-x---   2 user  admin  -    68 27 Feb 02:36 rsa
-rw-r-----   1 user  admin  - 14353 27 Feb 02:36 swanctl.conf
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 x509
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 x509aa
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 x509ac
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 x509ca
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 x509crl
drwxr-xr-x   2 user  admin  -    68 27 Feb 02:36 x509ocsp

/usr/local/etc/swanctl/bliss:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/conf.d:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/ecdsa:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/pkcs12:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/pkcs8:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/private:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/pubkey:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/rsa:
total 0
drwxr-x---   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/x509:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/x509aa:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/x509ac:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/x509ca:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/x509crl:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

/usr/local/etc/swanctl/x509ocsp:
total 0
drwxr-xr-x   2 user  admin  -  68 27 Feb 02:36 .
drwxr-xr-x  17 user  admin  - 578 27 Feb 02:36 ..

You must log in to answer this question.