Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: HowTo: SSH Tunnel Firefox

  1. #1
    Join Date
    Apr 2007
    Location
    Redmond, WA
    Beans
    1,371
    Distro
    Ubuntu 8.04 Hardy Heron

    HowTo: SSH Tunnel Firefox

    A ssh tunnel for Firefox to a remote computer is good security measure. Especially when connecting via an untrusted network like a wifi hotspot or other public networks. The tunnel encrypts and sends the data to your remote machine then it is sent over the web to your destination. This tutorial assumes you have an account on a remote machine you can ssh into. This is a pretty easy set up.

    The command to connect

    Code:
    ssh -D 9999 -C me@ipaddress.com
    The -D switch - Specifies a local “dynamic” application-level port forwarding. We are also adding the -C switch for compression.

    Next we need to put the settings into Firefox.

    Firefox> Edit> Preferences> Advanced tab> Network tab> Settings button.

    Select Manual proxy configuration
    SOCKS Host: localhost Port: 9999
    SOCKS v5
    No Proxy for: localhost, 127.0.0.1
    Screenshot below.

    Note: Sometimes localhost can cause a problem. If your settings are right and it still is not working replace localhost with 127.0.0.1.


    Using the ssh SOCKS5 proxy all of your info is passed through the tunnel except DNS requests. DNS requests are requests that look up names like google.com and turn them into IP addresses. If you want your DNS requests to go through the SOCKS5 proxy (yes you want this feature -- trust me if you are going through all the trouble to create this encrypted tunnel), you need to do the following.

    1. Open up firefox
    2. Type about:config on the location bar
    3. Filter for the following: network.proxy.socks_remote_dns
    4. Set the value to True (Right Click on the value in the column)
    5. Restart Firefox

    Now all DNS requests will go through the SOCKS5 proxy rather than the local network.

    Thanks to Kevdog for the DNS section.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screenshot-Connection Settings.png 
Views:	9335 
Size:	45.2 KB 
ID:	62446  
    Last edited by wormser; March 27th, 2008 at 05:22 AM.

  2. #2
    Join Date
    May 2006
    Location
    100acrewood
    Beans
    7,294
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: HowTo: SSH Tunnel Firefox

    Nice one. Thank you. I will certainly use it.

  3. #3
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,726
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HowTo: SSH Tunnel Firefox

    Not a bad tutorial, but if you could expand it to include the server setup (for beginners) it would be very helpful. Also probably would be preferrable to run ssh over a different port, however that's just a concern of mine.

  4. #4
    Join Date
    May 2006
    Location
    100acrewood
    Beans
    7,294
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: HowTo: SSH Tunnel Firefox

    You have a point, Kevdog, public providers might block certain ports.

  5. #5
    Join Date
    Apr 2007
    Beans
    34

    Re: HowTo: SSH Tunnel Firefox

    Is there was a way to do this without having putty open and running? (Windows)
    Last edited by vik.vaughn; March 21st, 2008 at 07:53 PM.

  6. #6
    Join Date
    Mar 2006
    Beans
    4

    Re: HowTo: SSH Tunnel Firefox

    is there a way to test if the tunnel is working?

  7. #7
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,726
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HowTo: SSH Tunnel Firefox

    Vik

    In windows you need to establish the ssh connection to the server. I know there are several ways of doing this -- however putty is one of the most popular clients. There are others however. I'm not certain but I dont think the foxy proxy plugin for firefox has the ability to first log into the ssh server and then establish the proxy. You may want to check into this. None the less, you need a client to make a connection first

    spotdart

    The best way I know to verify you are connected to the proxy is while uisng the proxy, at your browser use:

    http://showmyip.com

    What should be shown here is the IP address of the proxy server rather than your physical IP address. Try visiting the site with and without the proxy and the IP address should be different.

  8. #8
    Join Date
    Apr 2007
    Beans
    34

    Re: HowTo: SSH Tunnel Firefox

    I just checked out foxyproxy, it doesn't have the ability to automatically login to SSH, but it is a very robust proxy tool. I'll definitely be using that from now on.

    I'm going to shoot an email to the foxy proxy folks and request that they add SSH functionality since it seems like a very popular way to securely proxy.

  9. #9
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,726
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HowTo: SSH Tunnel Firefox

    vik

    I think that sounds like a great idea -- I think that would be a welcome addition to that useful proxy add-on.

  10. #10
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,726
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HowTo: SSH Tunnel Firefox

    Hey just wanted to add some info to your SOCKS5 proxy tunnel setup.

    Using the ssh SOCKS5 proxy all of your info is passed through the tunnel except DNS requests. DNS requests are requests that look up names like google.com and turn them into IP addresses. If you want your DNS requests to go through the SOCKS5 proxy (yes you want this feature -- trust me if you are going through all the trouble to create this encrypted tunnel), you need to do the following.

    1. Open up firefox
    2. Type about:config on the location bar
    3. Filter for the following: network.proxy.socks_remote_dns
    4. Set the value to True (Right Click on the value in the column)
    5. Restart Firefox

    Now all DNS requests will go through the SOCKS5 proxy rather than the local network.

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

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