LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-26-2009, 01:25 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
iptable rule


Hi all..

Can anyone please tell me in the below rule
Code:
-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
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:16 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
Open Source Consulting | Domain Registration