Using SSH tunnels to secure network traffic from hackers / prying eyes

AID: 8331
  • Status: Published

1080 points

  • Byedster9999
  • TypeTips/Tricks
  • Posted on2011-10-17 at 13:33:32
When you send traffic on the network or on wireless it may be in plain text and it may reveal all your passwords and details.  Most programs do not use encryption by default.

This is acceptable if you own every device on the network and are sure that it can not be intercepted by anyone else.  If you are using wireless - especially if you are using a shared public wireless point (a coffee shop etc) then your passwords are flying round in the air just waiting to be grabbed with nothing more than a laptop and some software.

As soon as you are on the wireless network and attached to the internet using something like VPN will encrypt all your traffic and pass it to a known destination.  VPN is not always the simplest system to setup and may be blocked by the network you are on.  Another system is called SSH Tunnelling.

All you need for this to work is a Linux (or unix) server in a remote location (for example at home or at work) on a publicly accessible network.  This can be an old PC attached to your network or a web server on the internet from a hosting company (one where you get ssh access).

This server then becomes a stepping stone in the middle.  Your data is encrypted and sent to this server where it leaves and goes out onto the Internet. Check that this server has SSH server running on it.  If not install it and start it.

SSH is very easy to install for example -
http://www.cyberciti.biz/faq/ubuntu-linux-openssh-server-installation-and-configuration/

If you wish (or need) to use http proxy then you will also need to install squid.  This is fairly simple to do and there are lots of how-to docs on the internet.  Set it up for port 8080.

Now on your workstation install puTTY :
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Add in the IP (or hostname of your server) and save it with a name like my-server

putty1.bmp
  • 590 KB
  • Putty showing ip and port
Putty showing ip and port


On the menu on the left click CONNECTION and SSH and TUNNELS
Select Dynamic and source port 7070 and click 'add'
Select 'Local', source port '8080' and destination '127.0.0.1:8080' and click add again.

putty2.bmp
  • 590 KB
  • PuTTY showing tunnel settings
PuTTY showing tunnel settings


Click on SESSIONS on the top of the left menu and save this setup.

Now when you open it you get a terminal window.  If you do not wish to use this at all there is an option 'dont start a shall or command at all' under SSH on the menu.

While it is running you can run any application that works with a proxy.  If it allows Socks 5 or 4 proxy then point it to 127.0.0.1 on port 7070 and it will now tunnel and the data will come out from your linux server.  If it only supports HTTP proxy then use 127.0.0.1 port 8080.

Traffic sent over this system can not be grabbed out of the air (sniffed) by hackers as it is encrypted.
    Asked On
    2011-10-17 at 13:33:32ID8331
    Tags

    ssh putty windows linux network security tunnel tcp ip

    Topic

    Internet & Email Software

    Views
    505

    Comments

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top Internet / Email Software Experts

    1. TerryAtOpus

      3,390

      0 points yesterday

      Profile
      Rank: Genius
    2. SSharma

      2,800

      0 points yesterday

      Profile
      Rank: Genius
    3. nobus

      2,000

      0 points yesterday

      Profile
      Rank: Savant
    4. mplungjan

      1,800

      0 points yesterday

      Profile
      Rank: Savant
    5. DavisMcCarn

      1,800

      0 points yesterday

      Profile
      Rank: Genius
    6. tedbilly

      1,800

      0 points yesterday

      Profile
      Rank: Genius
    7. sjef_bosman

      1,800

      0 points yesterday

      Profile
      Rank: Genius
    8. endital1097

      1,600

      0 points yesterday

      Profile
      Rank: Genius
    9. ve3ofa

      1,200

      0 points yesterday

      Profile
      Rank: Genius
    10. cohalex

      1,000

      0 points yesterday

      Profile
    11. gr8gonzo

      350

      0 points yesterday

      Profile
      Rank: Sage
    12. edster9999

      290

      0 points yesterday

      Profile
      Rank: Sage
    13. jennhp

      220

      0 points yesterday

      Profile

    Hall Of Fame