0

Disclaimer: I am still fairly an IT newbie and have been doing self-studies around web development. I decided to take the path of remote development.

After some research, I came up with this configuration:

  • remote: VPS (provided by an ISP) with a LAMP stack,
  • local: VS Code with Remote SSH extension to be able to edit the website code on the VPS,
  • Ubuntu 20.04 LTS on both systems.

My question now is: what do I need to do to make this whole configuration private (i.e. not accessible by the public)? What would be the best practice?

  1. I cannot configure the VPS firewall to only let connections from my IP through since it is not static. Thus, I would need to adjust my firewall rule daily which can't be the best solution.

  2. After some more research, I came across using a VPN. But I am not really familiar with that and it might be overkill for my case? Is having a VPN installed on the same VPS that I am using for web development even a good idea?

  3. Then, I read something about SSH Port Forwarding. Would this be the best approach? If I understood correctly, this would enable me to forward a (localhost) port on my local computer to a (localhost) port on the remote VPS. As a result I could type in "127.0.0.1:80" in the browser on my local computer and I should be able to see the web page which resides on the remote VPS. Would this SSH port forwarding still work if I configured the VPS firewall to block all connections (except SSH port 22) to prevent any public access to the remote VPS (website, database etc.)?

Basically, I am wondering what the best and easiest approach is to make development on a remote VPS completely private (as if that public VPS was located in my own home and not accessible to anyone but me).

Thank you in advance for any response.

Tando
  • 9
  • 3
  • Don’t overcomplicate things. Fairly typical when you can’t use IP based access controls is to simply restrict access to websites / web apps with a username and password. - And consider doing that for everything not production ready. HTTP Basic authentication can be used in addition to proper (session-based) authentication and most other forms of authentication that you would normally deploy. - That has the added benefit that you can create accounts for your clients as well to showcase your design. – HBruijn Sep 06 '22 at 09:36

0 Answers0