0

What is the correct way to allow connection from guest to an application running on host machine?

Example setup:

  • some application running on my Win 10 host machine, say NodeJS app on port 4400
  • guest OS in Hyper-v connected with Default Switch, eg Ubuntu 18.04 created via "Quick Create"

Windows Firewall blocks connections from guest to host:

2019-10-09 10:18:21 DROP TCP 172.17.147.6 172.17.147.1 59560 4400 60 S 3734288315 0 29200 - - - RECEIVE

That's is no surprise, because there's a rule "Node.js: Server-side JavaScript" that blocks traffic in "Public" networks, which is the type of network, assigned to Default Switch, created by Hyper-V.

What is surprising is that it worked before. Couple of months ago it worked for both NodeJS apps and Java apps. A week ago I tried the already existing setup, but was not able to access an app running at 9290. I tried to fix it, resetting Windows Firewall, but then lost ability to access 4400. I reset/reinstalled Hyper-V and NodeJS, hoping it adds some magic firewall rule to no avail. Still I can't see a reasonable rule that would allow access to NodeJS apps in "Public" networks.

So, what could be the magic, that allowed guest accessing host apps?

Kirill
  • 101
  • 4
  • Don't use the default switch, it's not designed to be a configurable NAT solution. Easiest way would be to set up an external virtual switch and share the host's NIC. Or, if you only need host<->guest communication, an internal virtual switch would work, but you'd need to set up your TCP/IP manuall. – essjae Oct 18 '19 at 20:17
  • @essjae, tried that, but it doesn't look like this is the reason of the issue. 1. Internal virtual switch is still unidentified (effectively Public) network, so the same firewall problem applies. 2. I'm sure it had worked with default switch. 3. It might work with external switch, but I have this problem: https://superuser.com/questions/1266248/hyper-v-external-network-switch-kills-my-hosts-network-performance And can't get around that with external switch alone – Kirill Oct 21 '19 at 10:19

0 Answers0