Running Multiple servers on one router (surfo soho)

I have successfully set up a web server on a raspberry pi, running behind my Surf Soho. I am able to ssh into my raspberry pi from both the local network, as well as the wide area network configured using port forwarding. Now, I am trying to set up an email server on a seperate physical server on the same router (surf soho).

I am not even entirely sure if it is possible to have two servers working behind one static public IP address, so here I am asking away.

So far, I have my second physical server (not the raspberry pi webserver), up and running locally, with successful ssh login using it’s local ip address on the local network behind the surf soho. However, my problem comes when trying to connect the second server (the email server) to my public ip address in order to ssh into it from the wide area network. It seems that if I use ssh@mypublicip there is no way of telling ssh which physical server it should be querying for login.

In other words, it “Feels” as though I must have 2 static public ip’s in order to run 2 seperate servers, because each public ip can only be forwarded to one physical server. Is this a true assumption? If not, does anyone know if the surf soho has any trickery that can be done to run two seperate physical servers behind it using only one static public ip address? Is there any way to automatically forward certain ssh login queries (or any queries for that matter), from my public Ip address to Server A, and another ssh login query from my public address to Server B?

Any tricks, tips, or other possible forums to ask this question in would be of great appreciation!

Hi Dan,

You would want to select an alternate port and select port mapping in the Port Forwarding settings. When connecting to the second device you’ll need to specify the new port when making the connection. (ex. ssh@mypublicip -p X) X=port

1 Like

Thankyou. I have tried this, and unfortunately the server is rejecting it. I will post back once I figure out what is blocking it exactly.