Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 2799  / 3 Years ago, thu, may 20, 2021, 5:23:27

I have a 12.04.4 server, and I have enabled ufw, and have tried to block port 8080. However, it is still open.



$ sudo ufw deny 8080
Rule added
Rule added (v6)

$ sudo ufw status numbered
Status: active

To Action From
-- ------ ----
[ 1] 22 ALLOW IN Anywhere
[ 2] 80 ALLOW IN Anywhere
[ 3] 8080 DENY IN Anywhere
[ 4] 22 ALLOW IN Anywhere (v6)
[ 5] 80 ALLOW IN Anywhere (v6)
[ 6] 8080 DENY IN Anywhere (v6)


Thoughts? I can still access the website that is on 8080. I have rebooted the system several times. The IP address is handled via static assignment, but I can't find anything that would indicate that that is the problem.



The service I'm trying to block is on a docker instance, however this question did not help.


More From » firewall

 Answers
5

The docker template that I am using is for Discourse. I solved it by editing the containers/app.yml file to include this under the ''expose' section:



 - "127.0.0.1:20080:80"


This means that it routes port 20080 on 127.0.0.1 to port 80 on the docker instance, thus removing the need entirely for a ufw rule.


[#25701] Friday, May 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shionnky

Total Points: 276
Total Questions: 104
Total Answers: 108

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
shionnky questions
;