Proxy traffic through an ssh tunnel

Discuss Networking

Proxy traffic through an ssh tunnel

Postby Master of Reality » Wed Dec 30, 2009 9:39 am

Hello again,
I'm trying to get all my outbound traffic to go through an ssh tunnel, but I can't find out how (and i'm sure its simple)

I've setup an ssh tunnel with
Code: Select all
ssh -fNT -D 9000 jason@myserver.com

and then I set the http_proxy environment variable to it would proxy all http traffic
Code: Select all
export http_proxy="http://127.0.0.1:9000"

but I also need non-http traffic to go through this tunnel (a database connection to be specific)

Is there another env variable to set for a proxy, or do I need to play with ip forwarding and iptables?
Master of Reality
guru
guru
 
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Postby Master of Reality » Wed Jan 13, 2010 12:06 pm

meh. I've given up on this method of accessing the server -- I wanted to use a GUI db client, but I'm just sshing in and playing with the command-line interactive client.
Master of Reality
guru
guru
 
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm


Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests