Re: How to restrict remote forwarding ports in SSH2?



You're quite right. Netcat is included in most unices (to get full
bidirectional port forwarding, you would actually need two shell
commands & a pipeline). Socat is quite a bit more versatile, and
would do the forward in a single command. I think it's available by
default in some unices, and should compile on nearly anything you're
likely to encounter.

Netcat is of course also available as a Windows binary, although doing
a bidirectional port forward is a bit trickier (does anyone know how
to do the equivalent of mkfifo in Windows?).

Cheers
Mark

On 11/24/06, Derek Martin wrote:

If I understand what you're asking, it's probably worth pointing out
that it's already possible to do this kind of port redirection in
general with TCP/IP without dealing with SSH's port redirection...
there's not much you can do to prevent it. Anyone capable of writing
socket code in C can write a program to redirect any port to anywhere
in maybe a couple of dozen lines.
...
Someone's probably already written a free program to do this kind of
port redirection, which can be downloaded freely. It might even have
pre-comiled binaries for your platform(s).>



Relevant Pages

  • Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
    ... thus the creation of the port on the node. ... Download the Windows Server 2003 resource kit and add prnadmin.dll to the ... Do you actually think I would post these scripts if it didnt work? ... In your response include the commands you used. ...
    (microsoft.public.windows.server.clustering)
  • OFF-TOPIC: HTML to send data out a certain port
    ... We're thinking of building a Debian-based web-server that offers up a "remote control" interface for a smart classroom in a university. ... In this way he can power up the projector, tell the projector to show the signal from the laptop port in the podium or to switch to the image from the document camera, crank up the sound system volume, dim the room lights, etc. ... The API documentation from their web site indicates it's a matter of just sending the correct ASCII sequence out the web server's TCP socket on Port 4998. ... The structures of iTach commands are described in the following sections. ...
    (Debian-User)
  • Re: GPRS dial up in Windows CE
    ... Use an application such as hyperterminal to send AT commands to your GSM ... the COM port that connects to your GSM. ... APN is depending on your sim: ... Uncheck Force long distance ...
    (microsoft.public.windowsce.platbuilder)
  • Re: telnet on port 25
    ... I think you can send some commands to send messages through the smtp server. ... > using port 25. ... I have never connected on port 25 using telnet ... > contact the sender using an alternative means of communication. ...
    (AIX-L)
  • Re: WIP: ATA to CAM integration
    ... HBA and a device through the Port Multiplier. ... "Since queued commands result in two different operations (command issue, ... to the command list that target a single port behind the Port Multiplier, ...
    (freebsd-arch)