Can't access home assistant broker with ip address

So, i’m having problems to access my broker with HA ip address.
I have my hassio installed on a Linux VM, the connection is via Wifi, and it works perfectly when I access with homeassistant.local:8123, but if I try to access with the VM/hassio ip address it gives me an ERROR message: “The site can’t be reached”.
I have successfully intagrated HA with an ESPHome device, so it is working, but i’m having problems to integrate with spotify and DuckDNS for exemple, that I need to redirect to an ip address.

I’m new to this so i’m a little confused.
When I type “ipconfig/all” in windows cmd, it gives me the static ip address I’ve set for my computer and for my VM: 192.168.xxx.xxx. When I login as root on my HA VM and type “ip addr show” or “dns info”, it gives me a different ip: 172.30.32.1, when I created my domain in DuckDNS it shows another ip: 189.x.xxx.xxx, and when I “ping homeassistant” on windows cmd, it shows an IPv6 address.
I tried to see through Fing and in my router settings if the VM was connected to the wifi and it doesn’t show as an active wireless client, but I can control my ESPHome devices normally.

I’ve tried to access my broker with all these ip address, but doesn’t work. I can only access with homeassistant.local:8123.

Anyone has any idea of what I can do to fix this and find the ip I need to access my broker?

Ok, you confused me a little bit. I would not call home assistant a broker.

Anyway, in a windows command prompt, what does nslookup homeassistant.local return ?

When I login as root on my HA VM and type “ip addr show” or “dns info”, it gives me a different ip: 172.30.32.1

That is normal, you login to the container, you get the internal docker network address

when I created my domain in DuckDNS it shows another ip: 189.x.xxx.xxx

That is normal, you get your external ip address

Sorry, didn’t know exactly what to call it lol.
So, on windows cmd nslookup homeassistant.local returns:

Server: dns.google
Address: 8.8.8.8

*** dns.google didn’t find homeassistant.local: Non-existent domain.

What should it return?

I thought it would return the IP of homeassistant.local .

I found out my problem.
The ip addresses I found wasn’t from the homeassistant connection. I could return it by typing “-4” with “ping homeassistant” to force it to use ipv4.
I haven’t set static ip too, had to do it with nmcli command on my VM.

Ty for help.