Skip to content

Commit 5efe687

Browse files
Adapt libreswan_approved_tunnels for sle16 and sle15
Use checks and remediation instructions references with strongswan, as it is the default IPSec solution for sle15 and sle16 platforms
1 parent e898dd2 commit 5efe687

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

  • linux_os/guide/system/network/network-ipsec/libreswan_approved_tunnels

linux_os/guide/system/network/network-ipsec/libreswan_approved_tunnels/policy/stig/shared.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,21 @@ checktext: |-
99
1010
Determine if the "IPsec" service is active with the following command:
1111
12+
{{% if product in ['sle15', 'sle16'] %}}
1213
$ systemctl is-active ipsec
14+
{{% else %}}
15+
$ systemctl is-active strongswan
16+
{{% endif %}}
1317
1418
Inactive
1519
1620
If the "IPsec" service is active, check for configured IPsec connections ("conn"), with the following command:
1721
1822
$ sudo grep -rni conn /etc/ipsec.conf /etc/ipsec.d/
19-
23+
{{% if product in ['sle15', 'sle16'] %}}
24+
Also:
25+
$ sudo grep -rni conn /etc/swanctl/swanctl.conf /etc/swanctl/conf.d/
26+
{{% endif %}}
2027
Verify any returned results are documented with the ISSO.
2128
2229
If the IPsec tunnels are active and not approved, this is a finding.

linux_os/guide/system/network/network-ipsec/libreswan_approved_tunnels/rule.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ description: |-
88
and IKE, which permits the creation of secure tunnels over
99
untrusted networks. As such, IPsec can be used to circumvent certain
1010
network requirements such as filtering. Verify that if any IPsec connection
11+
{{% if product in ['sle15', 'sle16'] %}}
12+
(<tt>conn</tt>) configured in <tt>/etc/swanctl/swanctl.conf</tt> and <tt>/etc/swanctl/conf.d/</tt>
13+
{{% else %}}
1114
(<tt>conn</tt>) configured in <tt>/etc/ipsec.conf</tt> and <tt>/etc/ipsec.d</tt>
15+
{{% endif %}}
1216
exists is an approved organizational connection.
1317
1418
rationale: 'IP tunneling mechanisms can be used to bypass network filtering.'
@@ -20,6 +24,7 @@ identifiers:
2024
cce@rhel9: CCE-90319-5
2125
cce@rhel10: CCE-87382-8
2226
cce@sle15: CCE-91153-7
27+
cce@sle16: CCE-95793-6
2328

2429
references:
2530
cis-csc: 1,12,13,14,15,16,18,4,6,8,9
@@ -41,18 +46,36 @@ ocil: |-
4146
{{% if 'rhel' in product or 'ol' in families %}}
4247
# {{{ pkg_manager }}} list installed libreswan
4348
libreswan.x86-64 3.20-5.el7_4
49+
{{% elif product in ['sle15', 'sle16'] %}}
50+
strongswan
4451
{{% endif %}}
4552
53+
{{% if product in ['sle15', 'sle16'] %}}
54+
If "libreswan" is installed, check to see if the "IPsec" service is active with the following command:
55+
{{% else %}}
4656
If "libreswan" is installed, check to see if the "IPsec" service is active with the following command:
57+
{{% endif %}}
4758
59+
{{% if product in ['sle15', 'sle16'] %}}
60+
# systemctl status strongswan
61+
strongswan.service - strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
62+
Loaded: loaded (/usr/lib/systemd/system/strongswan.service; disabled; preset: disabled)
63+
Active: inactive (dead)
64+
{{% else %}}
4865
# systemctl status ipsec
4966
ipsec.service - Internet Key Exchange (IKE) Protocol Daemon for IPsec
5067
Loaded: loaded (/usr/lib/systemd/system/ipsec.service; disabled)
5168
Active: inactive (dead)
69+
{{% endif %}}
5270
5371
5472
If the "IPsec" service is active, check for configured IPsec connections (<tt>conn</tt>), perform the following:
5573
<pre>grep -rni conn /etc/ipsec.conf /etc/ipsec.d/</pre>
74+
{{% if product in ['sle15', 'sle16'] %}}
75+
Also:
76+
<pre>grep -rni conn /etc/swanctl/swanctl.conf /etc/swanctl/conf.d/</pre>
77+
{{% endif %}}
78+
5679
Verify any returned results for organizational approval.
5780
5881
fixtext: |-

0 commit comments

Comments
 (0)