Problem to use hostname with ufe
I have problem with Ubuntu's ufw firewall, that when it is activated only ip adress works, not with hostnames.
Here are my settings acording to the firewall configuration.

Is it something wrong with my these settings or is it at all possible to use hostname with ufw?hi


Code:
ufw --version
ufw 0.36.2
Copyright 2008-2023 Canonical Ltd.
Code:
ufw status numbered
Status: active
     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     ALLOW IN    192.168.50.0/24
[ 2] 445/tcp                    ALLOW IN    192.168.50.0/24
[ 3] 137/tcp                    ALLOW IN    192.168.50.0/24
[ 4] 138/tcp                    ALLOW IN    192.168.50.0/24
[ 5] 139/tcp                    ALLOW IN    192.168.50.0/24
[ 6] 3306/tcp                   ALLOW IN    192.168.50.0/24
[ 7] 53/udp                     ALLOW IN    Anywhere
[ 8] 53/tcp                     ALLOW IN    Anywhere
Code:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 25.04
Release:        25.04
Codename:       plucky
Code:
cat /etc/resolv.conf
nameserver 8.8.8.8 Google DNS server
nameserver 8.8.4.4 Google DNS server
Code:
cat /etc/hosts
127.0.0.1 localhost
192.168.50.139 serverpc

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Code:
cat /etc/systemd/resolved.conf
DNS=8.8.8.8
FallbackDNS=8.8.4.4