LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-19-2011, 09:51 PM   #1
gentisle
Member
 
Registered: May 2005
Location: Wisconsin, USA
Distribution: LinuxMint, OpenBSD
Posts: 263

Rep: Reputation: 9
Is it Possible to SSH Tunnel With Linux Like On the Android?


Hi all,

I read on LifeHacker.com that you can download SSH Tunnel for your rooted Android which allows you to log in securely over unsecure wifi networks.

I'm guessing this is possible on Linux, but does that mean that I can point Firefox @ a site like Gmail or Yahoo Mail over an unsecure wifi network and my connection theoretically be unsniffable? I have found
Code:
http://support.suso.com/supki/SSH_Tutorial_for_Linux
http://www.revsys.com/writings/quicktips/ssh-tunnel.html
and I've read a little. It's starting to look like I would have to have my own server @ home to log in securely in order to do that, am I correct? If there is a way to do that, please give me the correct search phrase, so I can research on my own. Thanks.

gentisle
 
Old 06-19-2011, 10:16 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could simply use the https protocol in your browser. Another option you may have in mind is browsing through a vpn tunnel to your home computer.

The target of an SSH or VPN tunnel needs to be cooperative. This means the SSL protocol or you control the remote site.

Last edited by jschiwal; 06-19-2011 at 10:36 PM.
 
Old 06-19-2011, 10:32 PM   #3
gentisle
Member
 
Registered: May 2005
Location: Wisconsin, USA
Distribution: LinuxMint, OpenBSD
Posts: 263

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by jschiwal View Post
You could simply use the http protocol in your browser. Another option you may have in mind is browsing through a vpn tunnel to your home computer.

Did you mean httpS protocol? And do you mean browsing to a vpn on my router @ home? Maybe I didn't make my question clear. If I'm wanting to check email, but the hotel has only an unsecured wifi.

But I don't understand this,
[/QUOTE]
The target of an SSH or VPN tunnel needs to be cooperative. This means the SSL protocol or you control the remote site.[/QUOTE]
so I've got lots of reading to do
 
Old 06-19-2011, 10:39 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Yes, and I'll use auto-correction on my asus Android tablet as an excuse for my typo. It might even be true.
 
Old 06-20-2011, 04:31 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
Did you mean httpS protocol? And do you mean browsing to a vpn on my router @ home? Maybe I didn't make my question clear. If I'm wanting to check email, but the hotel has only an unsecured wifi.
Yes and you can do this with SSH. In fact it will undoubtedly be an easier approach than trying to configure a VPN. If you have SSH (SSHD, the server) running on you home network so that you can log in remotely, you can use this to establish a secure connection from an insecure location. You can do this by creating a SOCKS proxy tunnel using SSH and running your browser through this connection. The traffic will pass from your present location, via the encrypted SSH to your home, where it will then be relayed on to the final destination. Note, that if you want end-to-end encryption, for example if you were looking at a bank account, that you still need to use HTTPS. The SSH portion will only cover from your present location to your home.

To do this, once you have the SSH server running, is very easy. Open up a terminal and use a command like the following:
Code:
 ssh -ND 9999 <your server address/name>
or 
ssh -CND 9999 <your server address/name> to compress the SSH traffic
Then tell your browser to use a socks proxy on port 9999 at the address of localhost or 127.0.0.1

If you are using Firefox, you can also go to the about:config site and set it to use remote DNS. This will cause your browser to use your home LAN's DNS server so that the operators wherever your at won't even be able to see what you were up to via your DNS queries (i.e. the sites your going to).

Edit: if you do run an SSH server be sure to secure it properly. For example, do not allow root login and use key based authentication with passwords disabled. While it is a little trickier, this DOES work with phone SSH clients too.

Last edited by Noway2; 06-20-2011 at 04:34 AM.
 
Old 06-20-2011, 09:00 PM   #6
gentisle
Member
 
Registered: May 2005
Location: Wisconsin, USA
Distribution: LinuxMint, OpenBSD
Posts: 263

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by jschiwal View Post
Yes, and I'll use auto-correction on my asus Android tablet as an excuse for my typo. It might even be true.
HaHa, very funny.
 
Old 06-20-2011, 09:03 PM   #7
gentisle
Member
 
Registered: May 2005
Location: Wisconsin, USA
Distribution: LinuxMint, OpenBSD
Posts: 263

Original Poster
Rep: Reputation: 9
@Noway2

Hey, thank you so much for that info. But first I have to get the necessary hardware and built, install and configure a server. Even though I still don't understand it, it looks cool, and like a very useful tool. Looks like I really need to study, though.
 
Old 06-20-2011, 09:58 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I find it odd that some sites are up in https and never seem to tell anyone. I think Hotmail just got encrypted fully but not sure they others have taken so long.

You'd have to go to a special secure email to protect your data.
 
Old 06-20-2011, 10:11 PM   #9
gentisle
Member
 
Registered: May 2005
Location: Wisconsin, USA
Distribution: LinuxMint, OpenBSD
Posts: 263

Original Poster
Rep: Reputation: 9
@jefro: Yes, it would be nice if they all did that so the web was more secure.
 
Old 06-20-2011, 10:17 PM   #10
gentisle
Member
 
Registered: May 2005
Location: Wisconsin, USA
Distribution: LinuxMint, OpenBSD
Posts: 263

Original Poster
Rep: Reputation: 9
@all: I did find the gSTM app in my LinuxMint via Synaptic installer. It is Gnome SSH Tunnel Manager. But of course, it requires that I be able to log into a SSH server which I don't have. So back to the drawing board. Guess, I'll have to build a server, and learn to SSH it.
 
Old 06-20-2011, 10:20 PM   #11
sofly
LQ Newbie
 
Registered: Jun 2011
Distribution: RHEL, Debian
Posts: 21

Rep: Reputation: Disabled
The web is the most insecure and dungeon-y place ever, and most websites have zero regard for personal security, nevermind notifying you that they've just become https:// enabled.

I actually employ the exact technique you're wondering about, I tunnel over ssh and/or vpn to a box, which is great for connections that are either unsecured or for something that you may not trust (i.e. a public network that is "secured", but that has a simple password they hand out). The best way to get familiar with everything is doing exactly what you said, actually get the hardware, put a box together, and have at it!
 
Old 06-21-2011, 04:25 AM   #12
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
Guess, I'll have to build a server, and learn to SSH it.
The resource requirements are extremely modest. If you have a PC at home that you do, or could, routinely leave on that is all that would be required. No special or dedicated server needed. There are even SSH servers available for Windows, but Linux would be easier and probably has it enabled by default. The only things you would need to do are secure it properly (be sure to double check the configuration settings), add port forwarding to your router, and go.
 
  


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
2 linux boxes, proxy and ssh tunnel forwarding eddsstudio Linux - Newbie 3 05-25-2011 07:18 AM
LXer: remote control android, a reverse ssh tunnel LXer Syndicated Linux News 0 05-18-2010 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:49 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