LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2010, 09:47 PM   #1
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
tunneling ssh with tor help


Hi,I am running a laptop on debian squeeze. I am connecting my laptop to my server, which is running at home as an ssh server. Both computers have tor installed, and I am currently using my server as a SOCKS proxy through ssh tunneling using the command
Code:
# ssh -D 443 mydomain.net
Which I then plug into my browser's proxy settings, and have a tunneled connection. However, I would also like to route this tunnel through tor on the server side so I can have anonymity as well as security. I do not want it to appear as if i am running tor on my laptop, and I want my laptop to route all http traffic through the ssh tunnel to my server, and then my server to route the tunnel through tor. How do I tell my server to route all the traffic received in the tunnel to my tor proxy?
 
Old 12-17-2010, 04:19 AM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Hmmm maybe something like this:
install Polipo and configure it to use tor. after that, tunnel all the traffic to Polipo's proxy which in turn will tunnel all the traffic to tor.
 
Old 12-17-2010, 09:40 PM   #3
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Original Poster
Rep: Reputation: 36
I have polipo installed on the server but I am planning on using the tunnel for more than just http traffic. my real question is how to pipe the traffic coming through the tunnel through to the tor proxy.

ps. I love your signature
 
Old 12-18-2010, 02:25 AM   #4
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by mf93 View Post
I have polipo installed on the server but I am planning on using the tunnel for more than just http traffic. my real question is how to pipe the traffic coming through the tunnel through to the tor proxy.
ps. I love your signature
Code:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
-t nat is table type. I think nat would be best one.
eth0 is the interface your ssh tunnel coming from.
-p tcp protocol.
-dport 80 redirect http
--to-port 3128 to this port. Polipa must be running on this port.

You have to add one rule for other connections you want to route as well. Take a look at man iptables and this how to[1] for more ways to redirect different things.

[1] IT talks about transparent proxy but it would work for tor as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH, SOCKS, Tor and Privoxy fhsm Linux - Security 4 04-11-2009 07:40 AM
SSH Tunneling kpenrose Linux - Networking 4 10-16-2007 05:40 PM
Tunneling with ssh ssherman Linux - Networking 3 07-16-2007 02:13 AM
tor + ssh problems tgo Linux - Software 0 10-22-2005 03:06 AM
SSH Tunneling danny_beta_read Linux - Networking 0 06-10-2004 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration