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?