LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-27-2005, 06:03 PM   #1
whoever
LQ Newbie
 
Registered: May 2005
Location: Oakland, ca
Posts: 22

Rep: Reputation: 15
SSH port forwarding thru a NAT Firewall


I have tried this SSH port forwarding thru a NAT Firewall but I just don't get it. I guess that's why I'm called a NOOBY.
I have been able to SSH from my companies PC to my home PC using Telnet port 23.
Ultimately I'm trying to VNC from work to my home PC using tunneling.

H-E-L-P.
THnx you guys
 
Old 07-27-2005, 08:36 PM   #2
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
Are you sure it's SSH, if you're using port 23?

The easiest way to be able to do this is to use SSH's built-in port forwarding. The syntax is -L localport:remotehost:remoteport. So for instance, if you use this command:

ssh -L 5902:localhost:5900 user@your.home.pc

you will be able to connect on port 5902 on localhost which will then be tunneled to your home PC's port 5900. In this case, the ``localhost'' in ``5902:localhost:5900'' refers to the fact that it's connecting to the machine you've SSH'd into.

To connect to your home computer's VNC server, all you must do is fire up your VNC client and connect to localhost:2 [or just :2] since 5902 is VNC display number 2.

Let me know if you have any more trouble.
 
Old 07-28-2005, 06:53 PM   #3
whoever
LQ Newbie
 
Registered: May 2005
Location: Oakland, ca
Posts: 22

Original Poster
Rep: Reputation: 15
Thnx.. I appreciate your help.

The reason I use port 23 is because behind our firewall I know this port is open. Some ports aren't open. I use the SSH app called putty from a WinXP PC connecting to my Fedora 4 PC @ home.

I tried the ports use suggested but it still doesn't work.
 
Old 07-29-2005, 03:24 AM   #4
RedHatCat
Member
 
Registered: Jun 2005
Location: London, Uk
Distribution: RH-ES 3/4, FC 5/6
Posts: 51

Rep: Reputation: 15
To ssh into my home machine, I simply set up port forwarding on my router (or "Virtual Networks" I think my router calls it) - so that it forwards requests on port 22 (default ssh port) onto the IP of my RHES machine.
Then I just ssh to my external IP.

I guess you will need to configure your sshd_config to use port 23 (and specify the port on your client too) if thats all you have open on the router - easier just to change the router to forward 22 tho. Good luck

*as far as VNC goes, I'm not very knowledgable. I'd get an X-server for your windows machine (and enable X-tunnelling on your ssh client) and simply call gui programs fom the command line.

Last edited by RedHatCat; 07-29-2005 at 03:29 AM.
 
  


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
NAT and Port Forwarding aq_mishu Linux - Networking 2 09-16-2005 07:58 AM
SSH port forwarding through a firewall linuxLuser Linux - Networking 1 07-14-2005 11:29 PM
Firewall/NAT issues with X-Server w/ SSH forwarding JMCraig Linux - Security 1 01-25-2005 12:51 AM
Port Forwarding without NAT on an old Kernel linuxpyro Linux - Networking 0 06-02-2004 12:31 PM
NAT Port forwarding problems! nidputerguy Linux - Networking 4 01-31-2004 10:29 AM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration