LinuxQuestions.org
Review your favorite Linux distribution.
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 08-13-2014, 07:23 AM   #1
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Rep: Reputation: 31
SSH reverse proxy?


Hi all

Servers - SERVER1, SERVER2, SERVER3, SERVER4, SERVER5
OS - Centos 6
Service - SSH port 22


I have 5 servers on my LAN and the network has one external static IP address which points to SERVER1.

mydomain.com -> SERVER1

I can ssh to SERVER1 from home fine, but would like to also ssh directly onto SERVER2,3,4 & 5.

server2.mydomain.com -> local IP Address
server3.mydomain.com -> local IP Address
server4.mydomain.com -> local IP Address
server5.mydomain.com -> local IP Address

Can someone please recommend a way I can achieve this? We cannot setup a VPN and we cannot change the sshd port for each server.

Thanks in advance
 
Old 08-13-2014, 07:55 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,211

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Using iptables pick four ports and forward them to the servers. Set the servers sshd to listen on its port.
 
Old 08-13-2014, 03:25 PM   #3
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
You can try creating a port forward over the connection to server 1 using some arbitrary port forwarded to the target server LAN ip on port 22, something like

-L 12345:192.168.1.20:22

Then open an instance of your ssh client on the workstation to port 12345.
 
  


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
Reverse Tunneling / Reverse port forwarding in SSH dynamics Linux - Networking 5 02-07-2017 07:19 AM
SSH Reverse Tunnel - ~/.ssh/config - PHP marcelp1 Linux - Newbie 1 05-28-2014 12:49 AM
Nginx Reverse proxy on a internal apache reverse server ITiger Linux - Software 0 04-25-2014 07:44 AM
I need a reverse proxy solution for SSH jamesbon Linux - Server 8 01-29-2011 02:41 AM
Squid as Reverse Proxy and LAN proxy? zivota Linux - Security 2 02-26-2007 05:00 PM

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

All times are GMT -5. The time now is 06:02 PM.

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