pltrdy
By:
pltrdy

Server in VPN network as subdomain

February 5, 2016 1.4k 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) mydomain.com

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 10.0.0.0/24, the droplet is 10.0.0.1 on that network.
  • Connect both RPI to that VPN: 10.0.0.10 and 10.0.0.20
  • Now, I would like serverX.mydomain.com 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?
Thx,
Paul

2 comments
  • Hi, I think you would need to use some sort of dyndns service like https://www.duckdns.org/ 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.