Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to set up a subnet in our company.

We got several (10+) Linux servers for computing but we can only get 1 static IP (company policy, 10.x.x.x address). So the idea is to place a routing device in between the network and our servers that gets the only static IP.

Now the only way to my knowledge is that port forwarding can be used to redirect the traffic to the correct server.

While most people are not familiar with Linux, it should be easy that all servers can be accessed at default port 22 (SSH).

In what way can this be arranged?

Worst case solution is to use a VPN but that requires extra software to be installed on each client.

share|improve this question

closed as off-topic by Ward, kasperd, Tim Brigham, mdpc, MichelZ Sep 4 at 5:06

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Ward, kasperd, MichelZ
  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Tim Brigham, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Just to be clear: Do you mean that you only have one public IP address? –  Michael Hampton Aug 31 at 12:13
    
Please say what kind of addresses are available for you to assign to your 10+ linux servers. Private (RFC1918) addresses? Dynamically-assigned addresses? IPv6 addresses? –  aecolley Aug 31 at 13:10
    
I'm talking about private 10.x.x.x network addresses. Only 1 is static available for me but I have more that 1 host. –  Jeffrey Aug 31 at 13:46
    
Wait a minute.. you only have one private address and 10 machines? Go find whoever runs your network and beat some sense into him. –  Michael Hampton Sep 3 at 15:15

1 Answer 1

You are mixing 3 network layers. No, there is no way to implement DNS for port traffic redirections.

DNS is just alternative name for IP address, and to make a connection you need both IP and port. Since you only have 1 viable IP address, you only have 1 port 22. There are no such things as "virtual hosts" on layers 3 & 4.

You basically have 2 options here. First one is to have 10 different ports, and port forward them to backend servers. For example, port forward :10122 to server1:22, :10222 to server2:22, etc.

Other options - which you correctly assumed is better - is to set up VPN. But it requires additional services which you must maintain so it's a trade off situation.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.