LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ssh port forwarding (https://www.linuxquestions.org/questions/linux-software-2/ssh-port-forwarding-465490/)

simpl 07-19-2006 05:38 AM

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

spooon 07-19-2006 06:04 AM

you should do something like
Code:

ssh -N -C -R *:80:host1:80 root@host2
and turn on the GatewayPorts option in /etc/ssh/sshd_config

raskin 07-19-2006 06:12 AM

Look up -g key.

simpl 07-20-2006 01:41 AM

thanks, everything looks fine now!


All times are GMT -5. The time now is 08:33 PM.