Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-19-2006, 06:38 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 6

Rep: Reputation: 0
ssh port forwarding

here it goes:

I have a host1 behind firewalla and host2 in the internet
I need that host2 port 80 would resend data tu host1 port 80

so from host1 I run :
ssh -N -C -R 80:host1:80 root@host2

everything works fine in host2 when trying to connect to localhost:80

but ssh does not make socket to listen host2 external ( internet ) IP ?
anyone has any ideas how to do that?

p.s. sorry for my english
Old 07-19-2006, 07:04 AM   #2
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 49
you should do something like
ssh -N -C -R *:80:host1:80 root@host2
and turn on the GatewayPorts option in /etc/ssh/sshd_config
Old 07-19-2006, 07:12 AM   #3
Senior Member
Registered: Sep 2005
Location: Russia
Distribution: NixOS (
Posts: 1,899

Rep: Reputation: 68
Look up -g key.
Old 07-20-2006, 02:41 AM   #4
LQ Newbie
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0
thanks, everything looks fine now!


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
SSH Port Forwarding wwnexc Linux - Networking 4 09-29-2005 02:26 AM
Port forwarding for ssh Adriaan Linux - Networking 1 03-08-2004 10:11 AM
Ssh port forwarding? J_Szucs Linux - Networking 1 10-29-2003 05:42 AM
Help with Port Forwarding for SSH mi6 Linux - Networking 6 07-29-2003 01:46 PM
ssh, and port forwarding Tricky Linux - Networking 3 01-06-2003 08:50 PM

All times are GMT -5. The time now is 03:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration