# Ensure iptables Loopback Traffic Is Properly Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235371-ensure-iptables-loopback-traffic-is-properly-configured
- 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:**  
 The loopback interface (lo) handles internal system traffic. Configuring iptables to accept all traffic on the loopback interface ensures essential local communications are not blocked, maintaining system stability and functionality.

**Rationale:** Allowing loopback traffic prevents disruption of internal system processes and services that rely on local network communication.

**Impact:** Pros:

-   Ensures proper operation of local services.  
    
-   Prevents unnecessary firewall blocks on internal traffic.  
    

Cons:

-   Misconfiguration may expose local traffic to unintended filtering (rare in this case).  
    

**Default Value:** Loopback traffic is often allowed by default but should be verified.

**Pre-requisites:**

-   Root or sudo privileges to configure firewall rules.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1\. List current iptables rules for the loopback interface:  

iptables -L INPUT -v -n | grep lo

2\. Verify that rules exist allowing all traffic on the lo interface.

### **Implementation Plan:**

**Using Linux command line:**

1\. Add rules to accept loopback traffic if missing:  

iptables -A INPUT -i lo -j ACCEPT  
iptables -A OUTPUT -o lo -j ACCEPT

2\. Save iptables rules to persist across reboots:  

service iptables save  # or use iptables-save depending on the system

3\. Verify rules are in place  

iptables -L INPUT -v -n | grep lo

### **Backout Plan:**

**Using Linux command line:**

1\. Remove loopback acceptance rules if necessary:  

iptables -D INPUT -i lo -j ACCEPT  
iptables -D OUTPUT -o lo -j ACCEPT

2\. iptables rules and verify removal.  
  
**References:**

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

## 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.
