Discussion:
[strongSwan] Logging configuration with swanctl.conf
bls s
2018-08-08 00:25:06 UTC
Permalink
I'm trying to enable strongswan logging in order to submit a question, but I can't seem to get logging set up correctly with swanctl.conf Here's what I added to swanctl.conf. How can I get logging enabled in this configuration? This is strongswan 5.6.3 on latest Raspbian/Debian.

Thanks!

charon-systemd {
filelog {
/var/log/charon_debug.log {
time_format = %a, %Y-%m-%d %R
default = 2
mgr = 0
net = 1
enc = 1
asn = 1
job = 1
ike_name = yes
append = no
flush_line = yes
}
}
Christian Salway
2018-08-08 04:42:46 UTC
Permalink
Hi bls,

Configuration looks good. This is what I use. Make sure you have saved to the correct file and that you have permission to write to /var/log

cat <<'EOF' > /etc/strongswan.d/charon-systemd.conf
charon-systemd {
filelog {
/var/log/strongswan.log {
time_format = %b %e %T
flush_line = yes
default = -1
cfg = 2
ike = 2
}
}
}
EOF


> On 8 Aug 2018, at 01:25, bls s <***@outlook.com> wrote:
>
> I'm trying to enable strongswan logging in order to submit a question, but I can't seem to get logging set up correctly with swanctl.conf Here's what I added to swanctl.conf. How can I get logging enabled in this configuration? This is strongswan 5.6.3 on latest Raspbian/Debian.
>
> Thanks!
>
> charon-systemd {
> filelog {
> /var/log/charon_debug.log {
> time_format = %a, %Y-%m-%d %R
> default = 2
> mgr = 0
> net = 1
> enc = 1
> asn = 1
> job = 1
> ike_name = yes
> append = no
> flush_line = yes
> }
> }
bls s
2018-08-08 13:31:53 UTC
Permalink
Christian, thanks for the reply. File permissions were fine, but you pointed me in precisely the right direction. I had the logging info in /etc/swanctl/swanctl.conf. Moving it to /etc/strongswan.d/charon-systemd.conf did the trick.

Thanks!
________________________________
From: Christian Salway <***@naimuri.com>
Sent: Tuesday, August 7, 2018 9:42 PM
To: bls s
Cc: ***@lists.strongswan.org
Subject: Re: [strongSwan] Logging configuration with swanctl.conf

Hi bls,

Configuration looks good. This is what I use. Make sure you have saved to the correct file and that you have permission to write to /var/log


cat <<'EOF' > /etc/strongswan.d/charon-systemd.conf
charon-systemd {
filelog {
/var/log/strongswan.log {
time_format = %b %e %T
flush_line = yes
default = -1
cfg = 2
ike = 2
}
}
}
EOF


On 8 Aug 2018, at 01:25, bls s <***@outlook.com<mailto:***@outlook.com>> wrote:

I'm trying to enable strongswan logging in order to submit a question, but I can't seem to get logging set up correctly with swanctl.conf Here's what I added to swanctl.conf. How can I get logging enabled in this configuration? This is strongswan 5.6.3 on latest Raspbian/Debian.

Thanks!

charon-systemd {
filelog {
/var/log/charon_debug.log {
time_format = %a, %Y-%m-%d %R
default = 2
mgr = 0
net = 1
enc = 1
asn = 1
job = 1
ike_name = yes
append = no
flush_line = yes
}
}
Loading...