LinuxQuestions.org
Help answer threads with 0 replies.
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 10-06-2005, 04:08 PM   #1
disorderly
Member
 
Registered: Sep 2003
Location: NJ
Distribution: RHEL5
Posts: 154

Rep: Reputation: 30
how to browse your home webserver securely from work


after setting up my vnc tunnels through ssh to my remote machines i figured i might as well share this small bit of fun i'm having. i've read lots of posts of how to surf through proxies but what if you want to (on your lunch break of course ) work on one of your websites that you have on your home computer's webserver while at work, but would rather the traffic be encrypted?

well it's actually really easy to either use putty or openssh to redirect http traffic over ssh to your remote machine!

1) start up putty or openssh and create a connection from your work computer's port 8080 to your home computer's port 80 like this:

ssh -l <username> <homeIPaddress> -L 8080:127.0.0.1:80

then in your web browser type in:
http://localhost:8080/
and you are then browsing your home webserver's pages completely encrypted! it just looks like you have an ssh session open from your computer1

enjoy
disorderly
 
Old 10-07-2005, 09:46 AM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Setting up SSL would be a good way as well
 
Old 10-23-2005, 09:51 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I use a similar strategy to get to my home computers. I have three of them that I occassionally need to access from work, and multiple ports on one of those.

However, the work firewall only allows one outgoing non-proxied port (port 22). So I can't use my router to port-forward different incoming connections to different computers on my home LAN, since I am limited to only one port outgoing from work. I want non-proxied because my firewall and router at home only let in my specific work PC's IP address, not the work proxy's IP address. I wish to keep it that way for security.

ssh port forwarding to the rescue.

I have rules like:

L 10080:192.168.0.1:80
L 20080:192.168.0.2:80
L 30080:192.168.0.3:80
L 34999:192.168.0.3:4999

You can kind of see how the choice of my local ports map to the remote IP/ports I want to connect to. That just makes things easier to remember at work. You're not limited to only forwarding ports to the single remote host that is accepting your ssh connection. You can use that ssh host to bounce to anywhere it can talk to itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Konqueror cannot browse outside /home/user bluefire Linux - General 5 03-26-2005 12:59 AM
can't browse my webserver from internal network enzolabrador Linux - Networking 8 08-30-2004 01:27 PM
can not browse tomcat webserver on linux from windows Ibrahim Linux - Software 3 04-06-2004 12:38 PM
can not browse tomcat webserver on linux from windows Ibrahim Linux - Networking 0 03-24-2004 11:32 AM
Konguerer crashes when trying to browse /home pele_smk Slackware 6 12-06-2003 05:09 PM

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

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