Re: Question on Netcat and Port Forwarding

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 06/02/04


Date: Wed, 02 Jun 2004 17:04:50 +0200

Patrick Rynhart wrote:
>
> Question on Netcat and Port Forwarding
>
> I want to set up a port forward, so that port 1000 is forwarded (via
> 'server') to port 2000 on 'mycomputer'. If 'server' was running sshd,
> I would use the command
>
> ssh server -L 1000:mycomputer:2000
>
> However, server does not have sshd installed. Is it possible to
> acheive this requirement by running netcat on server at user-level ?

How did you plan to get the connection from the client
to server?

Maybe you can do something with nc and the -e option.
Something like listening on one port and starting an
instance of nc when receiving a connection. But I
couldn't test it, because some paranoid person
decided -e should be disabled.

Anyway I recently wrote a program to do something
very similar. You can see the source here:
http://www.daimi.au.dk/~kasperd/linux_kernel/wrapper.c

-- 
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use kasperd@kd.lir.dk and abuse@kd.lir.dk
I'd rather be a hammer than a nail.


Relevant Pages

  • Putty/OpenSSH on Windows - Crash Port Forwarding
    ... I've got a Windows OpenSSH server behind a NAT DSL router and I'd like to ... use Putty's port forwarding feature on an XP client trough the Internet to ... but I can't retrieve my mails because the connection always crashes. ...
    (comp.security.ssh)
  • RE: Remote Desktop Connection
    ... Yes I already have configure port forwarding (sorry I forgot to mention in my ... Do I have to forward Public IP or IP address of the Windows 2000 server. ... It is also possible that network problems ... >> preventing your connection. ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: netcat as an http proxy server
    ... I use netcat a little, and find it fascinating, but there isn't much ... I can see that you are listening on local port 1234, ... Is 19080 the remote port that the connection is ... You can use netcat to protect your own workstation's X server against outside ...
    (comp.os.linux.networking)
  • Re: Exchange Server / ISA / Firewalls
    ... am planning installing an exchange server 2003 site using the same network and was hoping to share the internet connection and rather than have them both setup differently I was hoping to keep a standardised setup. ... Only on sites where I need incoming VPN's or other incoming services do I start port forwarding from the Netgear router to the SBS server. ... I do get slightly nervous having our main server connected directly to the Internet (ISA or no ISA). ...
    (microsoft.public.backoffice.smallbiz2000)
  • Question on Netcat and Port Forwarding
    ... Question on Netcat and Port Forwarding ... server does not have sshd installed. ...
    (comp.os.linux.development.apps)