Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-26-2009, 01:25 AM   #1
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
iptable rule

Hi all..

Can anyone please tell me in the below rule
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-m state --state NEW -m tcp

part stands for ?? confused....I understood remaining stuff

Thanks in advance....
Old 10-26-2009, 01:39 AM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Check the iptables man page. Essentially -m state tells iptables to use the state matching module (likewise -m tcp tells it to use the TCP module). The --state NEW is an argument to the state matching module, which tells it to match NEW packets (i.e. SYN packets which are not part of an established connection -- I think this will only match SYN packets and not SYN/ACK packets). Essentially, this rule tells iptables to allow incoming new connections to port 22.


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
what is an iptable? & how to seperate the network on the basis of iptable vinod.wagh Linux - Networking 1 09-11-2008 01:28 AM
Same Iptable rule to be avoided? Santoshkb Linux - Networking 2 12-21-2007 05:55 AM
complex iptable rule help farhan Linux - Security 2 08-31-2005 09:58 PM
iptable rule for rmi bijuhpd Linux - Newbie 2 04-27-2005 12:42 AM
Help me write iptable rule to LOG gpagedar Linux - Security 1 10-01-2003 06:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:18 AM.

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