Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question on Netcat and Port Forwarding

4 views
Skip to first unread message

Patrick Rynhart

unread,
Jun 2, 2004, 3:42:13 AM6/2/04
to
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 ?

If so, how would this be acheived ?

Regards

Patrick

Kasper Dupont

unread,
Jun 2, 2004, 11:04:50 AM6/2/04
to
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 kas...@kd.lir.dk and ab...@kd.lir.dk
I'd rather be a hammer than a nail.

0 new messages