[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh port-forwarding and UDP-connections



On Tue, Oct 16, 2001 at 10:54:13AM +0100, Vivek wrote:
> On Mon, 15 Oct 2001, A. Demarteau (linux rules!) wrote:
> 
> > hi,
> > I need to use a local service form my laptop (remote location).
> > Thi is an udp connection.
> > Now I was wondering if it is possible to forward udp-connections over an
> > ssh-tunnel.
> >
> > I know it's possible for tcp-connections, but this has to be udp.
> > Any suggestions?
> 
> http://www.stunnel.org/faq/otherapps.html#ToC2
> 
> Can I forward UDP services over stunnel?
> As described thus far, no. Stunnel works with SSL, which runs only on TCP.
> There are ways to forward UDP packets over TCP, and in principle these
> should be able to work over stunnel.
> 
> There are also other programs that do this natively, and could be used
> standalone or via stunnel, such as Zebedee. If you have any success
> tunneling UDP over stunnel, please contact the faq maintainer so we can
> write up a good HOWTO for folks.

Although tunneling UDP over TCP is generally considered a bad idea (see
other posts in this thread), it looks like your firewall forces you to
:-(

Perhaps netcat may of use here? Something like this may work (warning:
not tried and certainly not tested):

    outside-firewall$ nc -l 2345 | nc -u localhost 1234

    inside-firewall$ nc -l 1234 -u | nc outside 2345

which should (in theory) connect UDP port 1234 on inside to UDP port 1234 on
the outside, tunneling via TCP on port 2345. So instead of connecting
directly to outside:1234 you can connect to localhost:1234. 

Same sort of thing should be usable to tunnel UDP traffic through a SSH
TCP tunnel.

Just thinking loud...
-- 
Karl E. Jørgensen
karl@jorgensen.com
www.karl.jorgensen.com
==== Today's fortune:
"The identical is equal to itself, since it is different."
		-- Franco Spisani

Attachment: pgpickJyxJTw9.pgp
Description: PGP signature


Reply to: