Configuring firewall in VPS when using Docker Machines — is it necessary?

Hi, everyone!

In continuation of this vital topic, I have a question about firewall setup.

I got VPS and successfully deployed my project via Docker Machines.
Now I think about what following steps about VPS setup should I do.

The first thing, as I understand, is about closing unused ports in the firewall.
I see that my app is fully working, that means the allowed ports are open.
And I have checked some unused ports with help of https://portchecker.co/ and they are all closed.

That means, all the things about ports are already settled by Wappler and Docker, right?

First and foremost, before someone dives into ufw or iptables or whatever, I’ll save you the trouble and tell you Docker bypasses every firewall configuration :upside_down_face:

Pretty long story, but you can read about it here:

Is the port of the database server accessible on the outside? Ideally you would bind it to 127.0.0.1 and use a SSH tunnel to connect to it - these are specific details that one does not need to know, ideally Wappler would use this. As I don’t use Wappler’s Docker deployment I can’t confirm whether they’re using that method or not

I primarily use my provider’s firewall to block ports instead of the firewall inside of the virtual server

1 Like

Wow, thanks! That might be useful. But of course I hope it will not. :sweat_smile:
It really looks like my firewall has already been configured automatically, but I don’t sure how it happened.

At the moment I decided to use DBaaS, which my provider offers.
All this stuff around Docker seems already complicated enough, so I’m cutting the corners where possible.