Strongswan log file can not be created

506 Views Asked by At

I am on Debian 10 (buster). I installed StrongSwan 5.7.2. Then I try to create a file log by configuring the /etc/strongswan.d/charon-logging.conf

charon {
    filelog {
        charon {
                path = /var/log/charon.log
                time_format = %b %e %T
                ike_name = yes
                append = no
                default = 5
                ike = 2
                flush_line = yes
        }
        stderr {
                ike = 2
        }
    }
}

the /etc/strongswan.conf looks like this (I did not change it)

# strongswan.conf - strongSwan configuration file
#
# Refer to the strongswan.conf(5) manpage for details
#
# Configuration changes should be made in the included files

charon {
        load_modular = yes
        plugins {
                include strongswan.d/charon/*.conf
        }
}

include strongswan.d/*.conf

But the log file /var/log/charon.log was never generated. Any idea what was going wrong?

I expected the log file to be generated after the run

ipsec stop
ipsec start
1

There are 1 best solutions below

0
Nikolay Polyagoshko On

I had encountered the same issue and solution by @minuaka worked for me:

apt-get install -y apparmor-utils
aa-complain /usr/lib/ipsec/charon
aa-complain /usr/lib/ipsec/stroke

I'm not fully understand what above commands do, though.
For more details see: https://github.com/strongswan/strongswan/discussions/1849