Home Download Ubuntu

How to map an application to use a secure tunneling using an ssh server linuxbox port

In the previous tutorial I was talking about using a linuxbox as SOCKS5 proxy to tunnel all our traffic from our applications that supports SOCKS5 configuration.
In this tutorial we are going to use an application which does not support SOCKS5 configuration, to use our secure tunneling ssh server. The only problem is that we can map only one IP adress. But this should be enough to use a secure connection to connect to IRC, NFS (network file system), etc.

To find out the ip adress which we need to route through our secure tunneling, we ping that adress and we should see it's adress:

ping domain.com


That we route this ip through our tunnel:

sudo ssh root@123.123.123.123 -D 8080 -L 8081 111.111.111.111:6666


- root should be your remote linuxbox user
- 123.123.123.123 should be your remote linuxbox ip. you can put a domain name if it has one.
- -D 8080 makes a secure tunneling to your linuxbox ssh server by local port 8080
- -L 8081 makes port forwarding to the ip adress 111.111.111.111 on port 6666, which is the ip adress and port of the server we are going to connect to.

Example:

Using IRC client:

/server 127.0.0.1:8081


- 127.0.0.1 is equivalent to localhost
- 8081 is the port we just routed through our tunnel

In conclusion: to use our tunneling to connect secure to a server by an apllication which does not support SOCKS5 proxy, we need to connect to 127.0.0.1 to port 8081, NOT it's real ip adress.

Resources: hak5

0 comments:

Post a Comment