LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-19-2010, 08:36 PM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
port forwarding with ssh


I would like to ssh into server 192.168.6.12 and forward its port 47547 to 192.168.3.12 port 80 like:
192.168.6.12:47547 => 192.168.3.12:80

So when I am at the 192.168.6.100 desktop and put the URL:
http://192.168.6.12:47547
in the web browser, it is actually routed to:
http://192.168.3.12

How can you do this?

Because after you exit the ssh session then this port forwarding ends.
That temporary forwarding is exactly what I need.
 
Old 06-19-2010, 08:47 PM   #2
keithieopia
Member
 
Registered: Feb 2005
Posts: 69

Rep: Reputation: 18
With SSH you'll have to have a username, SSH, and allow SSH tunneling (not enabled on most default OpenSSH installs) on 192.168.3.12, but I bet you knew that anyway. This should work:

Quote:
ssh -f user@192.168.6.12 -L 47547:192.168.6.12:80 -N
 
1 members found this post helpful.
  


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
ssh port forwarding jackd1000 Red Hat 6 03-05-2009 04:58 AM
SSH Port Forwarding dylans Linux - Software 1 01-09-2009 10:28 PM
Port Forwarding with SSH jeremy LQ Articles Discussion 2 03-14-2008 11:16 AM
SSH Port Forwarding wwnexc Linux - Networking 4 09-29-2005 01:26 AM
SSH port forwarding tarballedtux Linux - Networking 2 05-29-2002 07:16 PM

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

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