0

I have ufw enabled as you can see here:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), allow (routed)
New profiles: skip

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

For some reason, when I started an HTTP Server on port 80, I was able to view the webpage, even though I have no rule set to allow port 80.

When I tried to deny port 80 as such:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), allow (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22/tcp                     LIMIT IN    Anywhere                  
80/tcp                     DENY IN     Anywhere                  
22/tcp (v6)                LIMIT IN    Anywhere (v6)             
80/tcp (v6)                DENY IN     Anywhere (v6)

I was still able to view the webpage.

Can someone please tell me what am I doing wrong?

  • Any chance webserver is running in docker? – awesoon Jan 18 '20 at 18:11
  • Yes, the webserver is running on a docker container. However, I am accessing the webpage from outside the machine hosing docker. Does docker open the port on the host automatically? – Phillip Jan 18 '20 at 18:21
  • I'm using this tool: https://github.com/chaifeng/ufw-docker (it also mentioned in the linked question), but I used it for small home projects and don't know if there are any issues in production – awesoon Jan 18 '20 at 18:25

0 Answers0