There is a fair amount of info out there about Docker over-riding UFW seetings, e.g. UFW is set to block all ports but spinning up a Docker container will allow traffic on a port. DO Support have pointed me towards guidance on this.
However, I am running into the opposite problem: if UFW is enabled, I cannot get to my Docker port. If UFW is disabled, I can get to my Docker port just fine. I would prefer to have UFW enabled and I have used: ufw allow <port-number> … but this is not helping.
Any idea what I need to do?
Thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Heya @esimms999,
Allowing the port via ufw should work. Are you sure that’s the only port needed by Docker?
Hey!
I’ve ran into the exact same issue a couple of days ago.
What worked for me was to restart Docker with
sudo systemctl restart docker
.If this does not help, do you by any chance have any other firewalls like CSF or a DigitalOcean Cloud firewall?
Also, if restarting Docker does not fix the issue, can you confirm the OS that you are using and the Docker version so I could try to reproduce this on my end and further investigate it?
Best,
Bobby