2

On my Windows 11 machine I've created a Hyper-V VM and installed Ubuntu 20.04 on it.

I run an Nginx Docker container on the VM and map port 80 to port 8080 on the machine with the command

docker run --rm -d -p 8080:80 nginx

I can then use curl on the Windows host to access Nginx using

curl http://my-vm:8080/

But if I try opening the http://my-vm:8080/ URL in a browser (I've tried Chrome and Edge), the connection times out.

I can see the curl request in the Nginx log, but nothing from the browser requests.

Any help getting it to work will be appreciated.

Update: If I use the IPv6 address of the VM (http://[fe80::204b:b831:d148:58aa]/) in the browser it works, but if I use the IPv4 address (http://172.17.196.155/), it doesn't.

I think it may be Docker related. Connections to software on the VM seems to work. It's software in a container on the VM that doesn't work.

4
  • Do you have any in-browser VPN or proxy set? // If you can access it using curl, everything is already set up correctly.
    – Daniel B
    Commented Apr 10, 2022 at 12:46
  • @DanielB No, I don't Commented Apr 10, 2022 at 12:47
  • Start providing us any configuration files that contain the IPv6 address
    – Ramhound
    Commented Apr 10, 2022 at 14:34
  • @Ramhound I haven't set it up anywhere. I think it must be Windows/Hyper-V that does some name resolution from my-vm to the IP addresses. I've found them using ping -4 my-vm and ping -6 my-vm. Commented Apr 10, 2022 at 14:38

0

You must log in to answer this question.

Browse other questions tagged .