0

I want to make a staging development environment. So that it could be reachable only by vpn. Is it possible to do it only with vps? I use contabo vps, and by default, once I open a port on the server it opens for everyone. I tried to use ufw, but it doesn't work with docker, but mostly all my workloads are in docker(rancher Kubernetes). Is there another firewall that will close all ports on the server. How do I connect nodes together so they are reachable by each other but, not the outside world?

I know that I could buy a dedicated server, install hypervisor and pfsense. But is it possible to do a similar thing with only vps without nested virtualization?

4
  • You can have a user-defined bridge with a port on each docker container for the internal network, not connected off-box. docs.docker.com/network/bridge
    – stark
    Commented Sep 11, 2020 at 15:00
  • @stark, So I've created a bridge network, runned nginx in it, but still, it is available at my host ip. What setting should I specify?
    – ogbofjnr
    Commented Sep 11, 2020 at 16:25
  • What's your host OS? On Ubuntu, I'd use brctl to make sure the bridge connects to the host, then connect the vpn to the bridge. That way the vpn, the host, and the containers are all connected, but not the outside net.
    – stark
    Commented Sep 11, 2020 at 19:30
  • yes, it is Ubuntu. But still port forwarded to host get public. I kind of found what I looked for with this github.com/chaifeng/ufw-docker
    – ogbofjnr
    Commented Sep 11, 2020 at 21:27

0

You must log in to answer this question.

Browse other questions tagged .