I'm new to Linux and encountered a problem with iptables
.
Here is the content of my /etc/sysconfig/iptables
file:
# Generated by iptables-save v1.4.7 on Tue Nov 27 21:41:04 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [40672:2356787]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Tue Nov 27 21:41:04 2012
But when I try sudo iptables -L -n -v -x
, I have the following output:
Chain INPUT (policy ACCEPT 261172 packets, 1040204290 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 522761 packets, 2080465034 bytes)
pkts bytes target prot opt in out source destination
Why aren't the rules from /etc/sysconfig/iptables
displayed in output?