Score:0

ufw blocking port I allowed

mk flag

I have a docker application running on port 5402 in an Ubuntu 22.04 LTS

36f81500c742   the/easytaxserver:latest   "dotnet EasyTax.Serv…"   6 hours ago   Up 6 hours   80/tcp, 0.0.0.0:5402->443/tcp, :::5402->443/tcp   easytaxcontainter

when the ufw is disabled it works fine. when I enable it blocks the port, even after i allowed it.

sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
21                         ALLOW       Anywhere
5432                       ALLOW       Anywhere
5401                       ALLOW       Anywhere
5402                       ALLOW       Anywhere
5402/tcp                   ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)
21 (v6)                    ALLOW       Anywhere (v6)
5432 (v6)                  ALLOW       Anywhere (v6)
5401 (v6)                  ALLOW       Anywhere (v6)
5402 (v6)                  ALLOW       Anywhere (v6)
5402/tcp (v6)              ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)

5402/tcp                   ALLOW OUT   Anywhere
5402/tcp (v6)              ALLOW OUT   Anywhere (v6)

log I got when i called https://192.168.1.42:5402/api/TaxZones

Apr 14 03:41:23 nest kernel: [597114.647424] [UFW BLOCK] IN=ens160 OUT=docker0 MAC=[omited] SRC=192.168.1.100 DST=172.17.0.3 LEN=52 TOS=0x00 PREC=0x00 TTL=127 ID=43134 DF PROTO=TCP SPT=56888 DPT=443 WINDOW=64240 RES=0x00 SYN URGP=0

Why does it say DPT=443, not 5402? how do I configure my server to fix this issue?

Marco avatar
br flag
ufw is only a frontend to iptables/nftbles (depending on your Ubuntu version) and ufw does more than you see with `ufw status`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.