Re: Question on Netcat and Port Forwarding
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 06/02/04
- Next message: Kasper Dupont: "Re: select() and SIGNAL"
- Previous message: OMard L P: "Re: Sony TRV140"
- In reply to: Patrick Rynhart: "Question on Netcat and Port Forwarding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Kasper Dupont: "Re: select() and SIGNAL"
- Previous message: OMard L P: "Re: Sony TRV140"
- In reply to: Patrick Rynhart: "Question on Netcat and Port Forwarding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|