# VNC over Proxy using socat

## RobinVossen

Is there a way to Tunnel VNC over a Proxy (lets say the Tor network) using Socat?

In the Gentoo Wiki I saw:

```
$ socat TCP4-LISTEN:2222,fork SOCKS4A:localhost:34vss3f3tohrri.onion:7878,socksport=9050
```

I should change that to

```
$ socat TCP4-LISTEN:7777,fork SOCKS4A:localhost:34vss3f3tohrri.onion:5901,socksport=9050
```

In that example the VNC listens to port 5901 and the client connects to port 7777? Or am I wrong here?

And can I also Encrypt the VNC traffic then using socats ssl function? Or do I have to run something then on both sides? (Since the Client has the JavaVNC viewer and Nothing else..!)

Well, can anyone help me with this?

I am fairly new to Socat so..

And how can I check if my socat tunnel works?

I tried to test mine using Netcat for both Client en Server. but I think I didnt had to right port listening to the output of the socat tunnel.

Anyhelp will be great, thanks.

Cheers,

Robin

----------

## Lethality

Try an http tunnel.

http://www.nocrew.org/software/httptunnel.html

----------

## RobinVossen

Thanks already but does httptunnel support SSL aswell?

And whats wrong with socat?

----------

## manaka

socat should be able to do this...   :Smile: 

In your example...

```

$ socat TCP4-LISTEN:7777,fork SOCKS4A:localhost:34vss3f3tohrri.onion:5901,socksport=9050

```

... socat would listen in port 7777. Would open a SOCKS4 connection to host localhost, port 9050 (i.e., to your local tor process). The tor network would connect to host 34vss3f3tohrri.onion, port 5901.

You can also try setting a transparent socks proxy. net-proxy/tsocks or net-proxy/dante should go fine.

----------

