Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As we can see in this, which is the default iptables on fedora 20

$ iptables -L INPUT --line-number
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
2    ACCEPT     all  --  anywhere             anywhere            
3    INPUT_direct  all  --  anywhere             anywhere            
4    INPUT_ZONES_SOURCE  all  --  anywhere             anywhere            
5    INPUT_ZONES  all  --  anywhere             anywhere            
6    ACCEPT     icmp --  anywhere             anywhere            
7    REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

for rule 2, why is it accepting all the targets?

share|improve this question
    
Is this a fresh install? Have you configured IPTABLES? Have you added any chains? Is this a server? You give very little information to help us answer the question –  Canadian Luke Mar 3 at 17:25
1  
The output of iptables-save would be much clearer than iptables -L, which often omits information. –  grawity Mar 3 at 19:30

1 Answer 1

As we can see:

# iptables -S INPUT
-P INPUT ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -j INPUT_direct
-A INPUT -j INPUT_ZONES_SOURCE
-A INPUT -j INPUT_ZONES
-A INPUT -p icmp -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited

"-A INPUT -i lo -j ACCEPT", that is the problem, iptables -L missed the lo information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.