Hello,
we use your famous gnu-netcat tool 0.7.0c for port-
Mapping (low-Ports to high-Port). on an Solaris 7
Machine. It works fine.
Now we must duplicate the stream to more than one
port. Now to two ports.
But netcat not work as i think in connect mode.
When i specified more than one port in a list, netcat
send only to the LOWEST port. When i specified in an
Range, also only one port is used.
What can we do ? Is it a bug or an feature ?
What we want is:
Receive Events on Port 162 and send them to Port
16200 AND 16300 twice.
With one Port it works, With two Ports not.
we start it in an pipe like this:
./netcat_0_7c -l -p 162 -u -z | ./netcat_0_7c -u -n
192.168.0.1 16200 16300
Please help us.
Thanks.
MFg
K.H. Ostertag
Karl-Heinz.Ostertag@Sparkassen-Informatik.de
Germany
The Doku said:
The Connect Mode
****************
In the connect mode, netcat connects to a remote
host and simply
links his stdin and stdout to the remote data stream.
Basic usage is:
netcat [options] hostname ports ...
The specified ports indicates actually all ports to
connect to.
-------------
So this means, more than one Port
Logged In: YES
user_id=361125
Greetings. Thank you for submitting your report.
GNU Netcat has a slightly different handling of multiple
destination ports than original nc110.
Currently, when you connect to multiple ports (like
100-105), it sequentially connects to port 100 and sends its
stdin. When the connection terminates (either caused by
remote side or using ^C, SIGINT) GNU Netcat finds the
following open port and continues its discussion without
re-sending what was already sent to the previous port.
> Receive Events on Port 162 and send them to Port
> 16200 AND 16300 twice.
On the other hand, I understand this is a limitation and
will probably be fixed for the next major release. But if
you mean that Netcat should send its data to both ports
*simultaneously*, than this is impossible by design.
Regards
Logged In: NO
I have what appears to be the same problem. I am trying to
have netcat listen on all available ports (1-65535) but can
only get one port at a time to listen. The command I am
using to listen is nc -l 10.0.0.101 1-65535 (or nc -l -b
10.0.0.101 1-65535) I then nmapped the devices (I'm trying
to test DMZ on a router/VoIP ATA) which returned ports 1,21,
and 22 open. 21 and 22 are indeed open on the DMZ (proftpd
and openssh) and netcat had port 1 open, but the other
60,000 or so ports that should have been open were not. I ver
Logged In: NO
sorry got cut off, then found the comments section
heh....can you have netcat listen on a range of ports? in
the comments you said it couldnt send to a range of ports