Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-13-2007, 03:36 PM   #1
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264

Rep: Reputation: 30
Cool Redirect All Traffic Through SSH


I am connecting to my computer at home using ssh. I want to redirect all traffic from the laptop in the field over ssh through the computer at home.

This works well for http, as i just connect to my computer at home using "ssh -D8080 ..." and then set the browser to proxy socks 8080.

I am now trying to redirect all traffic through ssh, no matter what protocol or port. I want the ssh connection to accept all the traffic which is meant for the laptop's ethernet card, and let that go to the computer at home.

This should eliminate the possibility of the laptop's traffic being intercepted in untrusted wlans, etc.

How would i do this using iptables? (I am thinking that maybe i would need privoxy to handle the socks stuff, but i am not sure).

Thanks for your help!
Old 03-13-2007, 05:55 PM   #2
Registered: Jan 2005
Location: germany
Distribution: suse, opensuse, debian, others for testing
Posts: 307

Rep: Reputation: 32
I'm not sure if that's really possible with openssh.

It can be done with openvpn though.


compared to openswan/ipsec quite relatively easy to run.
Old 03-14-2007, 05:37 AM   #3
Registered: Aug 2005
Distribution: Debian, OpenBSD, PFsense
Posts: 73

Rep: Reputation: 15
it's not a guide for ALL traffic, but with using socks proxy.. so you can use any app that supports socks

(windows guide though)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to redirect traffic from one server to another orko Linux - Networking 1 08-12-2006 08:48 AM
redirect traffic tim24 Linux - Networking 5 04-06-2006 10:45 AM
redirect traffic through apache kola Linux - Networking 7 12-11-2004 07:29 AM
Traffic redirect friki Linux - Software 2 11-04-2004 04:59 PM
Redirect traffic to internal IP? xmutex Linux - Networking 1 08-13-2001 10:29 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:16 PM.

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