Cannot connect to background rest server using port 5000 on hyper-v windows guest

Ab Himmit 96 Reputation points
2021-07-22T10:49:06.147+00:00

I have a hyper-v windows 7 guest. I also have a Rest server listening to port 5000 on this guest.
From the windows 10 host I can ping this VM. And I can ping the host from this VM.
I have added a rule to the firewall on this VM.
I'm using nmap to see if port 5000 is open on the VM, but I keep getting the status "filtered".
I cannot get port 5000 to open on this VM.
Any idea why the port 5000 cannot be opened on this VM?

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
0 comments No comments
{count} votes

Accepted answer
  1. Ab Himmit 96 Reputation points
    2021-07-25T09:59:17.893+00:00

    Thanks for your answer, all is good now.


12 additional answers

Sort by: Most helpful
  1. Ab Himmit 96 Reputation points
    2021-07-24T11:06:00.433+00:00

    Netstat result

    Active Connections

    Proto Local Address Foreign Address State PID
    TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3992
    TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 716
    TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 3992
    TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
    TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING 412
    TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING 764
    TCP 0.0.0.0:1027 0.0.0.0:0 LISTENING 968
    TCP 0.0.0.0:1028 0.0.0.0:0 LISTENING 512
    TCP 0.0.0.0:1029 0.0.0.0:0 LISTENING 520
    TCP 0.0.0.0:1069 0.0.0.0:0 LISTENING 1112
    TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING 1100
    TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING 712
    TCP 0.0.0.0:5357 0.0.0.0:0 LISTENING 4
    TCP 10.0.0.9:139 0.0.0.0:0 LISTENING 4
    TCP 127.0.0.1:5000 0.0.0.0:0 LISTENING 2324
    TCP 127.0.0.1:6379 0.0.0.0:0 LISTENING 1484
    TCP [::]:80 [::]:0 LISTENING 3992
    TCP [::]:135 [::]:0 LISTENING 716
    TCP [::]:443 [::]:0 LISTENING 3992
    TCP [::]:445 [::]:0 LISTENING 4
    TCP [::]:1025 [::]:0 LISTENING 412
    TCP [::]:1026 [::]:0 LISTENING 764
    TCP [::]:1027 [::]:0 LISTENING 968
    TCP [::]:1028 [::]:0 LISTENING 512
    TCP [::]:1029 [::]:0 LISTENING 520
    TCP [::]:1069 [::]:0 LISTENING 1112
    TCP [::]:3306 [::]:0 LISTENING 1100
    TCP [::]:3389 [::]:0 LISTENING 712
    TCP [::]:5357 [::]:0 LISTENING 4
    TCP [::1]:5000 [::]:0 LISTENING 2324
    TCP [fe80::b105:599a:77e9:4d3%17]:1077 [fe80::7d39:c3aa:b6e0:24ce%17]:445 ESTABLISHED 4
    UDP 0.0.0.0:500 : 968
    UDP 0.0.0.0:3702 : 936
    UDP 0.0.0.0:3702 : 936
    UDP 0.0.0.0:3702 : 2724
    UDP 0.0.0.0:3702 : 2724
    UDP 0.0.0.0:4500 : 968
    UDP 0.0.0.0:5355 : 712
    UDP 0.0.0.0:53435 : 2724
    UDP 0.0.0.0:53904 : 936
    UDP 0.0.0.0:64676 : 936
    UDP 10.0.0.9:137 : 4
    UDP 10.0.0.9:138 : 4
    UDP 10.0.0.9:1900 : 2724
    UDP 10.0.0.9:61333 : 2724
    UDP 127.0.0.1:1900 : 2724
    UDP 127.0.0.1:61334 : 2724
    UDP [::]:500 : 968
    UDP [::]:3702 : 936
    UDP [::]:3702 : 2724
    UDP [::]:3702 : 2724
    UDP [::]:3702 : 936
    UDP [::]:4500 : 968
    UDP [::]:5355 : 712
    UDP [::]:53436 : 2724
    UDP [::]:53905 : 936
    UDP [::]:64677 : 936
    UDP [::1]:1900 : 2724
    UDP [::1]:61332 : 2724
    UDP [fe80::b105:599a:77e9:4d3%17]:1900 : 2724
    UDP [fe80::b105:599a:77e9:4d3%17]:61331 : 2724

    IPConfig result

    Windows IP Configuration

    Host Name . . . . . . . . . . . . : abhimmit-PC
    Primary Dns Suffix . . . . . . . :
    Node Type . . . . . . . . . . . . : Mixed
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No

    Ethernet adapter Local Area Connection 6:

    Connection-specific DNS Suffix . :
    Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #4
    Physical Address. . . . . . . . . : 00-15-5D-F9-E3-04
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::b105:599a:77e9:4d3%17(Preferred)
    IPv4 Address. . . . . . . . . . . : 10.0.0.9(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Lease Obtained. . . . . . . . . . : Saturday, July 24, 2021 12:57:37 PM
    Lease Expires . . . . . . . . . . : Sunday, July 25, 2021 12:57:35 PM
    Default Gateway . . . . . . . . . : 10.0.0.138
    DHCP Server . . . . . . . . . . . : 10.0.0.138
    DHCPv6 IAID . . . . . . . . . . . : 352327005
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-24-6A-57-82-00-15-5D-F0-D5-01
    DNS Servers . . . . . . . . . . . : 10.0.0.138
    NetBIOS over Tcpip. . . . . . . . : Enabled

    Tunnel adapter isatap.{C9B51403-993C-4097-9B8F-2EED09E5D212}:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . :
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes

    0 comments No comments

  2. Anonymous
    2021-07-24T13:51:07.3+00:00

    Assuming you're asking about this one?
    TCP 127.0.0.1:5000 0.0.0.0:0 LISTENING 2324

    When it says 127.0.0.1 on the Local Address column it means that port is ONLY listening for connections from your PC itself, not from the Internet or network

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  3. Ab Himmit 96 Reputation points
    2021-07-25T15:32:21.443+00:00

    Altered the Rest Server settings. Now the netstat is showing;
    TCP 0.0.0.0:5000 0.0.0.0:0 LISTENING 3348

    Port 5000 seems to be open now and I can get to my data.

    Thanks all for your help.

    0 comments No comments

  4. Anonymous
    2021-07-25T15:38:47.87+00:00

    --please don't forget to upvote and Accept my answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.