Server in VPN network as subdomain

February 5, 2016 1.9k views
Apache VPN

Hi everybody,

I explain my setup:

  • I got 2 RPi in different locations (N.B: IP may change)
  • RPi hosts (at least) a webserver
  • 1 droplet here, publicly accessible at (lets say)

I would like to be able to access the RPi "though" the droplet (kindof front node).

Now I'm wondering what I can do and what I can't, the perfect scenario would be:

  • Setup a VPN on the droplet. Let say the VPN is, the droplet is on that network.
  • Connect both RPI to that VPN: and
  • Now, I would like to display my RPi webservers as http(s)://10.0.0.X0/ would do.

I've looked some Apache conf settings like Redirecting, Rewriting etc... but I'm not sure if this could do the job.

My RPI aren't connected for now so I didn't tried, but anyway the point isn't to try stuff randomly but to be sure.

Any idea, advices or docs?

  • Hi, I think you would need to use some sort of dyndns service like and then use that as a reference to your rpi's. The question is what/why you want to run this setup, is is for something like cassandra?

  • Hi thx for your reply.
    This setup would not expose the server directly which sound great to me.
    I was also considering it because it wouldnt require dns. Cuz even if servs public ip change their vpn "local" ip wouldnt.

Be the first one to answer this question.