Iptables file could not be found
Today, I found that there is a server that does not have a firewall configured, there is no response to using service iptables start/stop. Then, the / etc/sysconfig/iptables file is missing.
Example of firewall configuration:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
* filter
: INPUT ACCEPT [0:0]
: FORWARD ACCEPT [0:0]
: OUTPUT ACCEPT [0:0]
-An INPUT-m state-- state ESTABLISHED,RELATED-j ACCEPT
-An INPUT-p icmp-j ACCEPT
-An INPUT-I lo-j ACCEPT
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 22-j ACCEPT
-An INPUT-j REJECT-- reject-with icmp-host-prohibited
-A FORWARD-j REJECT-- reject-with icmp-host-prohibited
COMMIT
Resolve:
Configure a random rule: iptables-P OUTPUT ACCEPT
Service iptables save