So unfortunately my solution is working partly. It’s not being able to do a rebuild.
fatal: unable to access 'https://github.com/discourse/discourse.git/': Could not resolve host: github.com
I have no idea how to fix this at this moment so if anyone has an idea, let me know. If anyone has to working firewall rules let me know, or send in a PR.
Reverting to port 22 restricting only for this moment
Ah that makes sense… been rebuilding three instances and testing with different UFW configs en wasting all these hours… I managed to get one through but then could not repro it one another instance. Now one is rebuilding and it’s getting through while another one just failed this second.
Can confirm my firewall script blocks docker from accessing github, not sure what rule to add to fix this. Help is welcome. Also edited the post with my script so people won’t use it, lol.
EDIT: After checking, again, I can rebuild a Ubuntu20 installation just fine after using the UFW script. CentOS installations won’t rebuild after using the UFW script, something must be different there. Anyway, getting tired of firewalls at this point.
EDIT: My script works fine on Ubuntu servers, however CentOS will not succeed rebuilding your instance.