mor3dr3ad
mor3dr3ad

Reputation: 33

Multiple server behind one public IP address

so I am setting up my home network with multiple Raspberry Pis and I have run into an issue, which might be similar, but not exactly identical to some other queries here on stackoverflow. I am just starting so this might be a pretty newbie question.

Here is the setup: I have a router (a pretty shitty one as we rent the apartment from someone who had the network set up) and want to connect three Raspberry Pis with different functions:

So, here comes the question: is there a way to access each of these raspberries via their private IP addresses from outside my network?

I.e. I want to be able to access the owncloud, the VPN and the baby monitor via their respective private IP - addresses? Or do I need to find a way to run all these services on a single machine?

Thanks and sorry for asking basic questions.

Upvotes: 0

Views: 789

Answers (1)

Danny_ds
Danny_ds

Reputation: 11406

This can be done via port forwarding on the router.

For example:

for external IP / port 1234 -> forward to internal IP (and possibly different port) of RPi 1

for external IP / port 1235 -> forward to internal IP of RPi 2

and so on..

I use port 1234 as an example for the webserver, because there could be problems when using port 80 on a home network. To access it you can use yourPublicIP:1234/index.html (or dynamic_domain:1234 )

Upvotes: 1

Related Questions