Ubuntu: IPSEC VPN client inside Docker container (Ubuntu)


I want to run IPSEC VPN client inside a Ubuntu docker container, I have install strongswan and all the neccessary packages required for an ipsec client, but the problem arises when i start the strongswan daemon through;

ipsec start --nofork

it is showing me this error, and i am confused in sorting out what the issue really is, how can i run IPSEC client using strongswan inside a docker container.


Stopping strongSwan IPsec...

Starting strongSwan 5.3.5 IPsec [starter]...

/usr/lib/ipsec/charon: error while loading shared libraries:

libstrongswan.so.0: cannot open shared object file: No such file or directory

charon has died -- restart scheduled (5sec)

charon refused to be started

However i am unable to see the logs and status using the following command;

ipsec status

It shows no output


The most probable reason is apparmor configuration. Check the syslog on host. If you see apparmor "DENIED" errors, you can try following (on host):

# apt-get install apparmor-utils
# aa-complain /usr/lib/ipsec/libstrongswan.so.0

This will result in apparmor complaining, but allowing the library to be loaded in container.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »