* mport or multiport?
@ 2005-07-12 10:26 afshin lamei
2005-07-12 10:47 ` Cedric Blancher
0 siblings, 1 reply; 3+ messages in thread
From: afshin lamei @ 2005-07-12 10:26 UTC (permalink / raw)
To: netfilter
Dear all,
"iptables -A INPUT -p tcp -m mport --ports 20:23,80 -j DROP " from
patch-o-matic is perfect, but what is that: Source port or Destination
port?
I know that with "multiport" i can detrmine source ans dest ports, but
it is not so good because it doesn't accept ranges (eg: 20:50).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mport or multiport?
2005-07-12 10:26 mport or multiport? afshin lamei
@ 2005-07-12 10:47 ` Cedric Blancher
2005-07-12 12:48 ` Jan Engelhardt
0 siblings, 1 reply; 3+ messages in thread
From: Cedric Blancher @ 2005-07-12 10:47 UTC (permalink / raw)
To: afshin lamei; +Cc: netfilter
Le mardi 12 juillet 2005 à 14:56 +0430, afshin lamei a écrit :
> "iptables -A INPUT -p tcp -m mport --ports 20:23,80 -j DROP " from
> patch-o-matic is perfect, but what is that: Source port or Destination
> port?
Sorry, but RTFM :)
$iptables --version
iptables v1.3.1
$ man iptables
[...]
mport
This module matches a set of source or destination ports. Up to
15 ports can be specified. It can only be used in conjunction
with -p tcp or -p udp.
--source-ports port[,port[,port...]]
Match if the source port is one of the given ports. The
flag --sports is a convenient alias for this option.
--destination-ports port[,port[,port...]]
Match if the destination port is one of the given ports.
The flag --dports is a convenient alias for this option.
--ports port[,port[,port...]]
Match if the both the source and destination ports are
equal to each other and to one of the given ports.
--
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: mport or multiport?
2005-07-12 10:47 ` Cedric Blancher
@ 2005-07-12 12:48 ` Jan Engelhardt
0 siblings, 0 replies; 3+ messages in thread
From: Jan Engelhardt @ 2005-07-12 12:48 UTC (permalink / raw)
To: Cedric Blancher; +Cc: netfilter
> --ports port[,port[,port...]]
> Match if the both the source and destination ports are
> equal to each other and to one of the given ports.
There are few daemons which bind to the portnumber they are listening on.
BIND could be configured to use a fixed port (e.g. 53) as the source port, and
thus would be a possible use for --ports, because most destination ports for
dns are 53, _too_.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-12 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 10:26 mport or multiport? afshin lamei
2005-07-12 10:47 ` Cedric Blancher
2005-07-12 12:48 ` Jan Engelhardt
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.