Search code examples
raspberry-pidebianvpnportforwarding

Port Forwarding VPN Server


i'm planning on implementing web server hosted by Raspberry Pi at home, while also having a Dedicated Server with public IP.

The main problem is that my provider charge a lot for a static ip, so i simply dont want to pay.

And here is the question:

  1. Is it possible to achieve what i've mentioned on given diagram (if yes, then maybe some hints?)
  2. Will RPi be accessible through local network while connected to VPN enter image description here

Thank you for any help!


Solution

  • 1. That is basically possible, it is called a Reverse-Proxy (See wiki for a brief description). The exact implementation depends on the web server you use.

    Your dedicated Server will then accept client connections, get the content over the VPN from your Raspberry and serve it to the client like it's his.

    2. Your Pi will still be accessible from the local network while being in the VPN, since it should use a virtual adapter for the connection if its a client on its own. Otherwise, if the router acts as a gateway to the VPN it will do the routing and again your Pi will be fine.