Reputation: 33
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:
RPi 1 is running a Apache2 Webserver and hosting my owncloud instance. As I do not have a static public IP I am using noip.com to dynamically update a domain to resolve to my current IP - address.
RPi 2 is running a VPN service which I want to be able to use while being on the road, e.g. in Internet Cafés and such.
RPi 3 has a RPi Noir Camera v2 and serves as a Baby Monitor which is accessible via its private IP address within the network.
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
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