I'm running a container with docker-compose on a Linux VPS (Ubuntu 20.04). I want the container to be accessible only via a VPN (ie: the container ports are not exposed on the host to the Internet and the container only accepts traffic from 127.0.0.1 and the docker network) so I am thinking of setting up a VPN server on the VPS. I would like to understand if it's feasible and get suggestions on how to implement it. Some things I'm trying to figure out are:
- What type of VPN should I set up?
- Should the VPN server run on the host or in a container alongside the other container?
- Would another approach to get a secure connection be preferable/easier?
Any suggestions?