3.5.3.2.5 Ensure iptables rules are saved - FORWARD

Information

The iptables-services package includes the /etc/sysconfig/iptables file. The iptables rules in this file will be loaded by the iptables.service during boot, or when it is started or re-loaded.

Rationale:

If the iptables rules are not saved and a system re-boot occurs, the iptables rules will be lost.

Solution

Run the following commands to create or update the /etc/sysconfig/iptables file:
Run the following command to review the current running iptables configuration:

# iptables -L

Output should include:

Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- loopback/8 anywhere
ACCEPT tcp -- anywhere anywhere state ESTABLISHED
ACCEPT udp -- anywhere anywhere state ESTABLISHED
ACCEPT icmp -- anywhere anywhere state ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh state NEW

Chain FORWARD (policy DROP)
target prot opt source destination

Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW,ESTABLISHED
ACCEPT udp -- anywhere anywhere state NEW,ESTABLISHED
ACCEPT icmp -- anywhere anywhere state NEW,ESTABLISHED

Run the following command to save the verified running configuration to the file /etc/sysconfig/iptables:

# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

See Also

https://workbench.cisecurity.org/files/2925

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-7(12), CSCv7|9.4

Plugin: Unix

Control ID: f401c093596f011ed263fbd8130468af2c415165863c1f68b204895462fda733