Skip to contentSkip to conversation

-m tcp

DISCUSSION j.travis 3 participants 4 messages Mar 24, 2004 – Mar 25, 2004

lore
Share & tools
lore

j.travis

author
#0 lore raw

Is there any (functional) difference between these two statements?

-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

-A INPUT -p tcp --dport 80 -j ACCEPT

#1 lore raw

Review

Quoted 6 lines · j.travis

Is there any (functional) difference between these two statements?

(quoted diff) +0 -2
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
 
-A INPUT -p tcp --dport 80 -j ACCEPT

No. Absolutely not.

--
http://www.seclab.jp

author
#2 lore raw

-Then why might one be inclined to use the '-m tcp' in a situation like this? Clarity?

-Under what circumstances might '-m tcp' give added value?

Quoted 11 lines · j.travis

Review

Quoted 7 lines

Is there any (functional) difference between these two statements?

(quoted diff) +0 -2
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
 
-A INPUT -p tcp --dport 80 -j ACCEPT

No. Absolutely not.

#3 lore raw
Quoted 2 lines · j.travis

-Then why might one be inclined to use the '-m tcp' in a situation like this? Clarity?

One does not need it. Once you've specified -p tcp, iptables deduce automagically you're working with tcp match and then loads it.

Quoted 1 line

-Under what circumstances might '-m tcp' give added value?

None.

Signature · 2 lines
http://www.netexit.com/~sid/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
Quoted 2 lines
Quoted 2 lines

Hi! I'm your friendly neighbourhood signature virus. Copy me to your signature file and help me spread!