Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

2064  871K ACCEPT  all  --  *    *    0.0.0.0/0  0.0.0.0/0  state RELATED,ESTABLISHED 
0     0    DROP    tcp  --  *    *    0.0.0.0/0  0.0.0.0/0  tcp flags:0x3F/0x00 
0     0    DROP    tcp  --  *    *    0.0.0.0/0  0.0.0.0/0  tcp flags:!0x17/0x02 state NEW 
0     0    DROP    tcp  --  *    *    0.0.0.0/0  0.0.0.0/0  tcp flags:0x3F/0x3F 
0     0    ACCEPT  all  --  lo   *    0.0.0.0/0  0.0.0.0/0           
61    3712 ACCEPT  tcp  --  *    *    0.0.0.0/0  0.0.0.0/0  tcp dpt:80 
0     0    ACCEPT  tcp  --  *    *    0.0.0.0/0  0.0.0.0/0  tcp dpt:443 
0     0    ACCEPT  tcp  --  *    *    0.0.0.0/0  0.0.0.0/0  tcp dpt:22 

I am a little confused by the first line of this:

2064  871K ACCEPT  all  --  *    *    0.0.0.0/0    0.0.0.0/0     state RELATED,ESTABLISHED 

What is state RELATED,ESTABLISHED?

I am trying to block access to all but 80,443,22. Am I accomplishing this here?

share|improve this question

marked as duplicate by Matt, Iain, Falcon Momot, Ward, Jenny D Nov 25 '13 at 8:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Which bit of the documentation wasn't clear ? –  Iain Nov 24 '13 at 17:16
add comment

1 Answer 1

up vote 4 down vote accepted

Packets in a RELATED or ESTABLISHED state are those ones which belong to an already opened connection; you'll generally want to accept them, otherwise connections will get established correctly but nothing will be able to flow after the initial handshake.

share|improve this answer
    
yup, its a way of linux saying, this incoming packet is a response to a legitimate request from our own host.... let me let it thru –  nandoP Nov 24 '13 at 19:12
add comment

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