LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2008, 11:50 AM   #1
chatterbug89
Member
 
Registered: Jun 2004
Distribution: TopologiLinux 4.0.0, Slackware 10.0, LFS 6.0
Posts: 53

Rep: Reputation: 15
secure httptunnel problems


I'm trying to create a secure tunnel that can goes through port 443 (SHTTP) to my personal server at home, which then forwards it to port 22(SSH) on my personal server at my house.

To attempt to accomplish this I have SSH set up on my personal server as well as GNU Httptunnel installed on my laptop and server (http://www.nocrew.org/software/httptunnel.html). To test this setup everything is being done on my local network. 192.168.1.103 is my personal server running slackware and i'm tunneling from my laptop running Gentoo.

First, I set up the tunnel on my server by having all connections on port 443 fowarded to port 22:
hts -F localhost:22 443

Next I forwarded all connections to port 22 to port 443 on my laptop:
htc -F 22 192.168.1.103:443

Now, to make everything secure I set up a SOCKS proxy to foward everything on port 9999 to my SSH server:
ssh -D 9999 username@192.168.1.103

Finally, I set up SOCKS in firefox to localhost and port 9999. I also changed network.proxy.socks_remote_dns in about:config to true.

From what I can see, this all should work, but it doesn't seem to be working. I tried doing the following:
htc -F 1234 192.168.1.103:443
and then doing ssh -p 1234 username@192.168.1.103 to try to connect to the server through the http tunnel I made, but I just got connection refused messages (I tried another server on my network too just to be sure).

I'm not sure what I am doing wrong or if my logic is wrong. If anyone has any ideas, it would be appreciated.

EDIT: Thought I would mention that setting up the SOCKS proxy without going through the httptunnel works just fine. I've also tried using different ports for the server and my laptop with no luck.

Last edited by chatterbug89; 01-19-2008 at 11:58 AM.
 
Old 01-20-2008, 02:41 AM   #2
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Rep: Reputation: 15
Im just curious, why do you forward the ports on your laptop?

EDIT: Iv done something similar. I got SSH on port 81 (so I can open a range like 80-81 and not singel ports on my router). Right now I use putty and with a netstat I see that my outound port from this machine is 1293. my setup looks simple compared to yours, but its a secure tunnel.

Last edited by Kanon; 01-20-2008 at 02:46 AM.
 
Old 01-20-2008, 10:24 AM   #3
chatterbug89
Member
 
Registered: Jun 2004
Distribution: TopologiLinux 4.0.0, Slackware 10.0, LFS 6.0
Posts: 53

Original Poster
Rep: Reputation: 15
I could set up the SSH daemon to listen to connections on port 443 (Port 80 is in use by other things I have set up) and then set up a SOCKS connection between my laptop and my server at home, but that would not work in all situations.

suppose I am on a network where all connections must go through a proxy server. With my set up, I can tunnel through the proxy server and have a completely secure connection between my laptop and my server at home. If I set SSH to listen on port 443, things may not work right through the proxy server.

Quote:
Im just curious, why do you forward the ports on your laptop?
What do you mean? When you described using just SSH, you are still forwarding ports on your computer (such as forwarding 9999 to port 22 so you can use SOCKS with your favorite apps). I don't see how I could do it without forwarding any ports to somewhere using httptunnel and SOCKS.

I'll probably give this a try again later, but any tips on what I could be doing wrong would be nice. Since it is my own network I'm testing on, there shouldn't be any unknown factors making it not work.
 
Old 01-20-2008, 11:31 AM   #4
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Rep: Reputation: 15
Sry, for the noise. It seemed a bit elaborate. That said I see the point. Working on something similar, but Im not as far as you yet.
 
  


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
HTTPtunnel for linux Waqas Ahsan Linux - Networking 1 09-30-2006 08:24 AM
Wireless Problems on Un/Secure Networks ty13 Debian 2 08-19-2006 06:32 PM
Problems with Apache2 Secure Server javi_jaz1984 Linux - Security 9 04-03-2006 04:31 PM
httptunnel help dai Linux - Security 2 10-20-2003 04:42 PM
Secure Digital (SD) Memory Driver Problems? stevef1 Linux - General 2 12-15-2001 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:17 AM.

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