All of lore.kernel.org
 help / color / mirror / Atom feed
From: "anantharaman.iyer" <ananth@mail.mynetsec.com>
To: Payal Rathod <payal-iptables@staticky.com>,
	netfilter@lists.netfilter.org
Subject: Re: a doubt about INPUT rule
Date: Wed, 13 Aug 2003 13:59:47 +0530	[thread overview]
Message-ID: <20030813082947.M47631@mail.mynetsec.com> (raw)
In-Reply-To: <20030814064610.GA1701@linux.local>

hi,

when you are using implicit matching syntax such as "--dport" or "--sport", 
then you have to specify the specific protocol. There are currently three 
types of implicit matches for three different protocols. These are TCP 
matches, UDP matches and ICMP matches. The TCP based matches contain a set 
of unique criteria that are available only for TCP packets. UDP based 
matches contain another set of criteria that are available only for UDP 
packets. And the same thing for ICMP packets. Hence you have to use the 
option "-p tcp" or "-p udp" when you want to use it with "--dport" option. 
hope that explains ur doubt. 

Regards
Iyer Anantharaman

On Thu, 14 Aug 2003 12:16:10 +0530, Payal Rathod wrote
> Hi,
> Why does this give an error,
> 
> # iptables -A INPUT -p all -s 0/0 -d 192.168.0.10 --dport 21 -j ACCEPT
> iptables v1.2.7a: Unknown arg `--dport'
> Try `iptables -h' or 'iptables --help' for more information.
> 
> and this,
> 
> # iptables -A INPUT -s 0/0 -d 192.168.0.10 --dport 21 -j ACCEPT
> iptables v1.2.7a: Unknown arg `--dport'
> Try `iptables -h' or 'iptables --help' for more information.
> 
> But this works,
> 
> # iptables -A INPUT -p tcp -s 0/0 -d 192.168.0.10 --dport 21 -j ACCEPT
> 
> Why does it not work without -p and even with -p tcp?
> 
> With warm regards,
> -Payal
> 
> -- 
> "Visit GNU/Linux Success Stories"
> http://payal.staticky.com
> Guest-Book Section Updated.



--
Open WebMail Project (http://openwebmail.org)



      parent reply	other threads:[~2003-08-13  8:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-14  6:46 a doubt about INPUT rule Payal Rathod
2003-08-13  7:22 ` Ralf Spenneberg
2003-08-15 16:46   ` Payal Rathod
2003-08-14 21:28     ` Ralf Spenneberg
2003-08-13  8:13 ` anantharaman.iyer
2003-08-13  8:14 ` anantharaman.iyer
2003-08-13  8:29 ` anantharaman.iyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030813082947.M47631@mail.mynetsec.com \
    --to=ananth@mail.mynetsec.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=payal-iptables@staticky.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.