Score:0

How to setup a VPN server as the only way to access Docker containers on a Linux VPS?

lt flag

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?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.