
<def-group>
  <definition class="compliance" id="set_firewalld_default_zone" version="1">
    <metadata>
        <title>Set Default firewalld Zone for Incoming Packets</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>Check presence of DefaultZone=drop in /etc/firewalld/firewalld.conf</description>
    </metadata>
    <criteria operator="AND" comment="Test conditions - presence of the file plus 0 extra definitions.">
      <criterion comment="Check that /etc/firewalld/firewalld.conf contains a line with certain text" test_ref="test_set_firewalld_default_zone" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all"
  comment="tests the presence of 'DefaultZone=drop' setting in the /etc/firewalld/firewalld.conf file"
  id="test_set_firewalld_default_zone" version="1">
  <ind:object object_ref="obj_set_firewalld_default_zone" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_set_firewalld_default_zone" version="1">
    <ind:filepath>/etc/firewalld/firewalld.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*DefaultZone=drop[\s]*$</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>