Install, start and enable:
apt install firewalld
systemctl start firewalld
systemctl enable firewalld
Make sure the file /etc/docker/daemon.json
does not contain this line. If it does, delete/comment it. If the file is missing, it is OK, you can skip the step:
{