Help needed with network connectivity to an Ubuntu server running on Hyper-V

I’m running an Ubuntu 14.04 LTS LAMP server on Hyper-V, which itself is running under Windows 8.1. When I first set it up on my usual home network, I set it up with an ‘External’ virtual switch (VS1) which connected things to my laptop’s NIC, and made the server available around the rest of the network as 192.168.6.42. So far, so good.

Fast forward a week or so, and I needed to take the laptop into the office, where there was no WiFi available initially. I tried connecting to the copy of b2evolution I’d installed when all was well, but the browser was no longer able to find the server and gave me the message “This web page is not available”. Whilst eventually, I found myself a WiFi feed, the IP range wasn’t what the server was used to seeing, and I still couldn’t get connected.

Taking it back home didn’t improve matters - still I could get no connection despite the laptop being back on its usual address. I’m currently back home in the UK, where the laptop has picked up an IP address of 192.168.0.7, where if I run ip addr on the CL of the server, it’s still telling me it’s using 192.168.6.42.

Can anyone point me in the right direction for getting the IP’s aligned on this thing?

Have you checked the settings on your external virtual switch and make sure what IP this is use and that it allows forwarding. The post might help http://www.sitepoint.com/hyper-v-virtual-machine-tutorial/

Thanks for the link - I’ll take a read.

Well that’s got me somewhere. I ended up re-booting the Linux server and it picked up a new IP on the local LAN at 192.168.0.13. That gave me access to the root index.html file. Trying to follow down into the 192.168.0.13/b2evolution/ folder keeps getting redirected to 192.168.6.42/b2evolution/, which obviously doesn’t work. Time to go look up setting a static IP address on the server I think, and to find that redirect.

It probably wasn’t the correct solution, but the b2evolution install was very much tied to the IP address it saw when it was first installed, so as a way around the redirects, I just re-installed the lot - it only takes about 5 minutes. For the purposes of what I was checking out, that works fine as an approach for now, but not as a long term strategy - tactical fix only. More reading…

Could you not give the server a fix IP address and them map this IP address to another one if needed?

It’s just a matter of learning my way through the principles, then finding the steps to implement them. As often as not, it’s a matter of learning my way through a new piece of terminology - once that’s done, the implementation isn’t so bad.

I understand that the server needs a static IP, right now I’m trying to get my head around how that translates from inside the VM to outside where browsers, and potentially other devices can see it.

For my VM Server I have the following setup. I have a static IP address for the server set by the physical router I have. This router is setup to use the DYDNS sevice, so that any request coming in on the DYDNS name is automatically forwarded to the router. I have found that this works well most of the time.

I have to use this service as I do not have a fixed external IP address.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.