All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: a doubt about INPUT rule
  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-13  8:13 ` anantharaman.iyer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Ralf Spenneberg @ 2003-08-13  7:22 UTC (permalink / raw)
  To: Payal Rathod; +Cc: Netfilter

Am Don, 2003-08-14 um 08.46 schrieb Payal Rathod:
> # 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.
> 
--dport requires the definition of a protocol beforehand. It is only
defined when the protocol is either udp or tcp. Omitting the protocol or
using all does not work because icmp, esp, ah, etc. do not have a port.

> # iptables -A INPUT -p tcp -s 0/0 -d 192.168.0.10 --dport 21 -j ACCEPT
Like I said.

Cheers,

Ralf
-- 
Ralf Spenneberg
RHCE, RHCX

Book: Intrusion Detection für Linux Server   http://www.spenneberg.com
IPsec-Howto				     http://www.ipsec-howto.org
Honeynet Project Mirror:                     http://honeynet.spenneberg.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: a doubt about INPUT rule
  2003-08-14  6:46 a doubt about INPUT rule Payal Rathod
  2003-08-13  7:22 ` Ralf Spenneberg
@ 2003-08-13  8:13 ` anantharaman.iyer
  2003-08-13  8:14 ` anantharaman.iyer
  2003-08-13  8:29 ` anantharaman.iyer
  3 siblings, 0 replies; 7+ messages in thread
From: anantharaman.iyer @ 2003-08-13  8:13 UTC (permalink / raw)
  To: Payal Rathod, netfilter

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)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: a doubt about INPUT rule
  2003-08-14  6:46 a doubt about INPUT rule Payal Rathod
  2003-08-13  7:22 ` Ralf Spenneberg
  2003-08-13  8:13 ` anantharaman.iyer
@ 2003-08-13  8:14 ` anantharaman.iyer
  2003-08-13  8:29 ` anantharaman.iyer
  3 siblings, 0 replies; 7+ messages in thread
From: anantharaman.iyer @ 2003-08-13  8:14 UTC (permalink / raw)
  To: Payal Rathod, netfilter

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)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: a doubt about INPUT rule
  2003-08-14  6:46 a doubt about INPUT rule Payal Rathod
                   ` (2 preceding siblings ...)
  2003-08-13  8:14 ` anantharaman.iyer
@ 2003-08-13  8:29 ` anantharaman.iyer
  3 siblings, 0 replies; 7+ messages in thread
From: anantharaman.iyer @ 2003-08-13  8:29 UTC (permalink / raw)
  To: Payal Rathod, netfilter

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)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* a doubt about INPUT rule
@ 2003-08-14  6:46 Payal Rathod
  2003-08-13  7:22 ` Ralf Spenneberg
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Payal Rathod @ 2003-08-14  6:46 UTC (permalink / raw)
  To: netfilter

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: a doubt about INPUT rule
  2003-08-15 16:46   ` Payal Rathod
@ 2003-08-14 21:28     ` Ralf Spenneberg
  0 siblings, 0 replies; 7+ messages in thread
From: Ralf Spenneberg @ 2003-08-14 21:28 UTC (permalink / raw)
  To: Payal Rathod; +Cc: Netfilter

Am Fre, 2003-08-15 um 18.46 schrieb Payal Rathod:
> On Wed, Aug 13, 2003 at 09:22:25AM +0200, Ralf Spenneberg wrote:
> > --dport requires the definition of a protocol beforehand. It is only
> > defined when the protocol is either udp or tcp. Omitting the protocol or
> > using all does not work because icmp, esp, ah, etc. do not have a port.
> 
> Ok. Got it now. Thanks a lot Ralf for the excellent mails so far.
> 
> > Book: Intrusion Detection f?r Linux Server   http://www.spenneberg.com
> 
> Why is this ? in "f?r Linux Server"
It is the german word fuer. ue is a german umlaut. One character spelled
Ü.
This is a german book I wrote last year. You will find several chapters
online. But they are german because so far I have not found an
english/american publisher willing to publish it.


Cheers,

Ralf
-- 
Ralf Spenneberg
RHCE, RHCX

Book: Intrusion Detection für Linux Server   http://www.spenneberg.com
IPsec-Howto				     http://www.ipsec-howto.org
Honeynet Project Mirror:                     http://honeynet.spenneberg.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: a doubt about INPUT rule
  2003-08-13  7:22 ` Ralf Spenneberg
@ 2003-08-15 16:46   ` Payal Rathod
  2003-08-14 21:28     ` Ralf Spenneberg
  0 siblings, 1 reply; 7+ messages in thread
From: Payal Rathod @ 2003-08-15 16:46 UTC (permalink / raw)
  To: Ralf Spenneberg; +Cc: Netfilter

On Wed, Aug 13, 2003 at 09:22:25AM +0200, Ralf Spenneberg wrote:
> --dport requires the definition of a protocol beforehand. It is only
> defined when the protocol is either udp or tcp. Omitting the protocol or
> using all does not work because icmp, esp, ah, etc. do not have a port.

Ok. Got it now. Thanks a lot Ralf for the excellent mails so far.

> Book: Intrusion Detection f?r Linux Server   http://www.spenneberg.com

Why is this ? in "f?r Linux Server"

With warm regards,
-Payal

-- 
"Visit GNU/Linux Success Stories"
http://payal.staticky.com
Guest-Book Section Updated.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-15 16:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.