# Ensure Suspicious Packets Are Logged

- Source: https://support.icompaas.com/support/solutions/articles/62000235323-ensure-suspicious-packets-are-logged
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:** • Level 1

**Description:  
** Logging suspicious network packets enables detection of potentially malicious activity such as spoofing, malformed packets, or unexpected protocol usage. Collecting these logs is crucial for effective incident response and network security monitoring.

**Rationale:** Logging suspicious packets provides visibility into anomalous traffic patterns that could indicate attacks or misconfigurations, helping to quickly identify and mitigate threats.

**Impact:**  
 Pros:

-   Enhances detection of network-based attacks.  
    
-   Supports forensic analysis and security investigations.  
    

Cons:

-   May increase log volume; requires adequate log management and analysis tools.  
    

**Default Value:** Logging of suspicious packets may not be enabled by default.

**Pre-requisites:**

-   Root or sudo privileges to configure network logging.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1\. Check current iptables or nftables logging rules for suspicious packets. For example, using iptables:  

iptables -L -v -n | grep LOG

2\. Verify logging rules exist for suspicious or malformed packets.  

### **Implementation Plan:**

**Using Linux command line:**

1\. Add logging rules for suspicious packets, e.g., in iptables:  

iptables -A INPUT -m state --state INVALID -j LOG --log-prefix "Suspicious Packet: "  
iptables -A INPUT -m limit --limit 5/min -j LOG --log-prefix "Potential Attack: "  

2\. Save iptables rules to persist across reboots:  

service iptables save  # or equivalent for your system

### **Backout Plan:**

**Using Linux command line:**

1\. Remove or modify logging rules if needed:  

iptables -D INPUT -m state --state INVALID -j LOG --log-prefix "Suspicious Packet: "  
iptables -D INPUT -m limit --limit 5/min -j LOG --log-prefix "Potential Attack: "

2\. Save iptables rules after changes.  

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   Linux iptables Documentation  
    
-   [NIST SP 800-53 Revision 5 - AU-6  
    ](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#au-6)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
