Find the answer to your Linux question:
Results 1 to 5 of 5
Hi there, I have a linuxbox with tor and openssh server running (tor is listening on default port 38859 and the ssh server is running on 22). I can successfully ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    2

    firefox -> ssh -> tor on linuxbox


    Hi there,

    I have a linuxbox with tor and openssh server running (tor is listening on default port 38859 and the ssh server is running on 22).
    I can successfully establish an ssh connection to this linuxbox from my localmachine. I have tried to use putty to route requests on localmachine to tor on linuxbox, but I have been failing for some time now, despite sifting through many guides and forums.

    Please help.

    Also, I have cntlm (to authenticate past ISA proxy) running on linuxbox, which is listening on port 3129. I would also like to be able to route into cntlm from localmachine, using ssh. Is this also possible?

    Thanks!

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by s1ice View Post
    I can successfully establish an ssh connection to this linuxbox from my localmachine. I have tried to use putty to route requests on localmachine to tor on linuxbox, but I have been failing for some time now, despite sifting through many guides and forums.
    I don't understand what you mean by this. Can you provide a link to a guide that you've tried that adequately describes what you are trying to do?

    Note: you can use hxxp to post a "fake" URL.

    also, what linux distro are you using?

  3. #3
    Linux User
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    260
    Quote Originally Posted by s1ice View Post
    I have tried to use putty to route requests on localmachine to tor on linuxbox, but I have been failing for some time now...
    When you say "route", you mean sending TCP/IP packets to the Linux machine via SSH, then forwarding those packets over the Tor client on the Linux machine? To the best of my knowledge, PuTTY cannot do this.

    In terms of the OSI model, PuTTY works at the "Application layer": it presents to you the input and output of a shell program running on a remote machine while encrypting this information as it is transferred through TCP/IP. Firefox is also at the Application layer, and you can't just plug one application into the another application. Firefox uses your operating system's built-in networking functions to communicate with the Internet. If your operating system isn't set up to route packets to the Linux machine, Firefox cannot do it either.

    If I understand correctly, what you need is packet forwarding at the "Transport layer" of the OSI model, i.e. it is handled by the operating systems (Windows and Linux), not by your applications (Putty or Firefox).

    So what you are trying to do is setup a Virtual Private Network (VPN) to your Linux machine. VPN can use the same kind of encryption as SSH to forwards packets. Therefore you need to install a VPN server onto your Linux machine, for example PPTP (check out this turorial). If Linux is using Tor to connect to the internet, you can configure Linux to route the packets coming from Windows via the VPN onto the Tor network.

    Then, set up Windows to connect to the Internet via the VPN server provided by the Linux machine. Then Firefox will be able to connect to the internet via the VPN channel from Windows to Linux, which will in then be forwarded to Tor by Linux.

  4. #4
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    I never did this, but I assume you would have to create a SSH tunnel to the server as described here:

    HOWTO: SSH Tunneling Made Easy

    If you open a tunnel like this:

    ssh -f -L 80:your.home.server:38859 -N user@your.home.server

    all local traffic going through port 80 will be actually sent to your homeserver at port 38859 where tor awaits data. Let us know if this works for you.

  5. #5
    Just Joined!
    Join Date
    Jul 2012
    Posts
    2

    Tried & failed

    Quote Originally Posted by Kloschüssel View Post
    I never did this, but I assume you would have to create a SSH tunnel to the server as described here:

    (URL)

    If you open a tunnel like this:

    ssh -f -L 80:your.home.server:38859 -N user@your.home.server

    all local traffic going through port 80 will be actually sent to your homeserver at port 38859 where tor awaits data. Let us know if this works for you.
    This is the type of thing I have been trying to achieve. So I fired up linux on localmachine to test your suggestion. (even though my goal is to accomplish this in windows on localmachine, hence putty). Was I supposed to set my firefox socks5 proxy to localhost:80? Doing this gave me the ssh tunneling error:
    Code:
     channel 2: open failed: connect failed: Connection refused
    What is going on here?
    I should instead go the VPN route then?

    Thanks again everyone!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •