0

I've got Nextcloud set up in a Hyper-V machine, and IIS running a reverse proxy into the Hyper-V machine. Right now, it's set up so that the reverse proxy rewrites the url using the IP address, but the issue is that the (internal) IP address of the Hyper-V machine keeps changing every time it reboots.

I've tried setting up a static ip within the Hyper-V machine but then the Hyper-V machine loses connectivity if I do, and I've tried rewriting the IP address using the hostname, but there's no DNS server so Windows can't resolve the hostname.

Is there any solution where I can set up the reverse proxy such that I don't need to keep editing the IP address of the rewrite every time I reboot?

immanis
  • 1
  • 1
  • dhcp reservation? – yagmoth555 Nov 21 '19 at 04:55
  • I can't find the dhcp reservation config in Hyper-V. The Hyper-V instance is running on a different subnet (an internal subnet without only the host and instance) than the main network so dhcp reservation on the router doesn't do anything – immanis Nov 21 '19 at 05:26
  • "I've tried setting up a static ip within the Hyper-V machine but then the Hyper-V machine loses connectivity if I do" indicates you mess up the static IP settings. Did you set both static IP address/mask, as well as gateway IP address correctly? The last is often missed. – Lex Li Nov 21 '19 at 14:22
  • Yeah, the issue is that when I reboot the machine, the IP of the host changes so I have to then go and reconfigure the default gateway – immanis Nov 22 '19 at 10:04

1 Answers1

0

Alright, I'm such a dingus. It seems like the answer to this is to set a static MAC Address...

For anyone who sees this in the future: Using the default switch: VM Settings -> Hardware -> Network Adapter -> Advanced Features -> MAC address -> Static

immanis
  • 1
  • 1