LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-30-2008, 02:51 PM   #1
jbarnes1967
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
Routing SSH traffic


We have a SSH server in our DMZ that we use as an external tunnel to our internal Perforce server for outside users. When an outside user wants to connect to our Perforce server the first start a SSH session on their local machine that routes all connections to localhost:1666 thru a SSH connection to the SSH server and on to the Perforce server. The Perforce client is then configured to look for its server at localhost:1666. One of our users IT department doesn't allow this type of connection and is requiring the connection be routed thru an addition server in THEIR DMZ running Red Hat linux. I've been tasked with helping them configure the Red Hat server but networking isn't an area where I'm strong. Can I do this by configuring iptables on the Red Hat machine? If so how?

Thanks in advance.
 
Old 06-30-2008, 03:05 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
To what extent do you want to keep the current model in place? If ssh tunnels work for you, then whilst they are a pretty ugly way to do what you seem to be doing, keep doing it. don't start adding in additional mechanisms, as things will get more confusing. ssh clients can listen to external connections as well as internal when passing traffic through a tunnel, so on the new server, which would be the ssh client you can just set that up as normal and let it forward requests from the local network to it's port 1666 to go via the tunnel as if they were beign established locally. I'd then be using iptables to very tightly control what ip's are allowed to use that service, but that's just standard firewalling.
 
Old 06-30-2008, 03:06 PM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
So have them do the same ssh connection with port forwarding from their Red Hat server to your server. The only difference is they need to use the bind_address as the internal IP address of their Red Hat server (instead of localhost or 127.0.0.1). Then they configure their Perforce clients to connect to <Red Hat server's IP> port 1666.

There's no special routing involved, they just need to setup the ssh tunnel on their DMZ machine.
 
Old 06-30-2008, 05:09 PM   #4
jbarnes1967
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Maybe I didn't explain the situation well enough.

Here is how it looks for most outside users:

[UserMachine (outside world)] --> [SSH Server (our DMZ)] --> [Perforce (our network)]

Here is how one of the users IT department wants them to connect:

[UserMachine (their network)] --> [RedHat Server (their DMZ)] --> [SSH Server (our DMZ)] --> [Perforce (our network)]

So what's happening is our IT department is saying "The only way we'll allow external connections to the Perforce server is through this SSH Server" and their IT department is saying "The only way we'll allow outgoing connections of this type is by routing them through the RedHat Server".

Maybe it would be possible to create the SSH connection between their RedHat Server and our SSH Server and have them connect to the RedHat Server. Is this possible? How?

Again, this isn't my area of expertise.

Thanks again!
 
Old 06-30-2008, 09:38 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Quote:
Originally Posted by jbarnes1967 View Post
Maybe it would be possible to create the SSH connection between their RedHat Server and our SSH Server and have them connect to the RedHat Server. Is this possible? How?

Again, this isn't my area of expertise.

Thanks again!
Yes, that's exactly what I said.

From their Red Hat server they would do:

ssh -L their_ip:their_port:perforce_ip:perforce_port your_server_ip

Then their users would point their Perforce clients to their_ip:their_port

It's almost identical to how outside clients are connect now, except that in this case the Red Hat server is the "client computer" and the actual Perforce clients connect to their_ip instead of "localhost".

Make sense?
 
  


Reply



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
Routing web traffic to different IP? jvanv8 Linux - Networking 3 05-07-2009 05:05 AM
routing traffic from one interface to another a550ee Linux - Networking 0 07-08-2007 03:28 PM
routing traffic out different eth#?? cjs500 Linux - Networking 3 07-11-2005 12:59 AM
Routing traffic fuelinjection Linux - Networking 3 04-01-2005 05:51 PM
inbound traffic routing beowulfde Linux - Networking 2 02-20-2005 04:47 PM

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

All times are GMT -5. The time now is 04:47 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