port 80 still opened still uff set to deny incoming

Ufw was set to deny all incoming and only allow ssh, however it seems port 80 still open, why

ufw status verbose
Status: active
Logging: on (medium)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip

To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
22/tcp (v6) ALLOW IN Anywhere (v6)

from remote nc -zv <ip address=""> 80
Connection to <ip address=""> port 80 [tcp/http] succeeded!</ip></ip>

4 Replies

Did you restart the firewall?

-- sw

yes
sudo systemctl enable ufw
sudo systemctl start ufw

even rebooted.
ufw is running.

Tried to delete allow ssh, it worked, can't connect to ssh from remote but still port 80 opened.

I found the answer:
"Note
If you are running Docker, by default Docker directly manipulates iptables. Any UFW rules that you specify do not apply to Docker containers."
And I'm using docker container

Since ufw is a friendly front-end™ to iptables (the real firewall), you need to make sure that iptables is (re-)started as well.

I have no idea if you’re using a docker container.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct