LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-03-2006, 05:41 PM   #1
Durham
Member
 
Registered: Feb 2002
Distribution: Debian, Ubuntu, Clonezilla, Knoppix, Kubuntu
Posts: 46

Rep: Reputation: 16
Forwarding to diffrent subnets


This is the scenario:
Code:
               /---- Firewall1 ----- Server & net 1
              /
--Firwall----------- Firewall2 ----- Server & net 2
              \
               \---- Firewall3 ----- Server & net 3
How can I ssh directly to anyone of the 3 servers form the outside?
I have forwarded port 22 so that I'm able to reach server 1 from the outside.
From server1 I can ssh to the two other servers.

Is it possible to get direct access to all of the servers?
 
Old 11-03-2006, 06:21 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Yes, but what you have to do is use non-standard ports for the other two servers. So map port 10022 to server 2 port 22 and 11022 to server 3 port 22. Then when you invoke ssh from outside, you have to make it use port 10022 for server 2 and 11022 for server 3.
 
Old 11-04-2006, 06:14 AM   #3
Durham
Member
 
Registered: Feb 2002
Distribution: Debian, Ubuntu, Clonezilla, Knoppix, Kubuntu
Posts: 46

Original Poster
Rep: Reputation: 16
OK, for server1 it's easy, and I understand what's happening.

--ssh port22 -->firewall---> 22:firewall1:22 ---> 22:server1

But I don't understand how to forward the ports 10022 and 11022
 
Old 11-06-2006, 11:57 AM   #4
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Well, on your firewall box, you have to create a specific port forwarding rule for each box. This is dependent on what type of firewall/router you have. I have a linksys with 3rd party firmware as my home router, so I can just upload a custom firewall/NAT using fwbuilder. Most home routers have a page where you can create special rules for specific ports. Sorry I can't help you much with that. But then you'll call ssh with the -D option for the specific port to your outside firewall.

ssh -D 10022 --> 10022:firewall --> 22:firewall2 --> 22:server2
ssh -D 11022 --> 11022:firewall --> 22:firewall3 --> 22:server3
 
  


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
How to assign diffrent ip/hostnames to diffrent services koppaspider Linux - General 1 02-10-2006 09:03 PM
Can you tell me some diffrent between LILO and GRUB? Khmer Linux - Newbie 5 10-21-2005 09:39 AM
SAMBA betweeb diffrent subnets Ipolit Linux - Networking 11 08-03-2005 10:53 AM
samba login from diffrent subnets bally Linux - General 3 12-13-2003 06:50 AM
Diffrent Distributions On Same System? shadowman21i Linux - Distributions 2 10-08-2002 05:56 AM


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

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