LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2015, 10:39 AM   #1
gengyabc
LQ Newbie
 
Registered: May 2015
Posts: 2

Rep: Reputation: Disabled
questions about iptables


Hi everyone
I have a question about iptables

This line
Code:
iptables -A INPUT -p tcp  -m tcp --dport 80 -j ACCEPT
why there is a "-m tcp"? what does this mean? I checked some book and man, I did not find what does this mean.

Thank you very much for your help.
 
Old 05-12-2015, 11:26 AM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,185
Blog Entries: 10

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Welcome to LQ!
at http://ipset.netfilter.org/iptables.man.html shows
Code:
       -m, --match match
              Specifies a match to use, that is, an extension module that tests for a specific property. The set  of
              matches  make up the condition under which a target is invoked. Matches are evaluated first to last as
              specified on the command line and work in short-circuit fashion, i.e. if one extension  yields  false,
              evaluation will stop.
What that means exactly, I don't know, never had to use or implement it or if it involves a rule named tcp.
 
Old 05-12-2015, 11:26 AM   #3
lazydog
Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 786
Blog Entries: 1

Rep: Reputation: 125Reputation: 125
'-m' = Match

Code:
-m, --match match
Specifies a match to use, that is, an extension module that tests for a specific property. The set of matches make up the 
condition under which a target is invoked. Matches are evaluated first to last as specified on the command line and work in 
short-circuit fashion, i.e. if one extension yields false, evaluation will stop.
 
Old 05-13-2015, 10:12 AM   #4
gengyabc
LQ Newbie
 
Registered: May 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you very much.
then I will not use -m tcp.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables questions linuxcoo Linux - Newbie 5 03-29-2010 04:06 AM
2 questions about iptables . jean2e Linux - Security 6 04-30-2009 06:34 AM
iptables questions hattori.hanzo Linux - Networking 1 05-16-2008 08:31 AM
iptables questions FNC Linux - Security 3 07-12-2007 07:42 PM
iptables questions notsosmart Linux - Security 2 10-15-2006 01:39 PM


All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration