I have set up a local development environment on my laptop. It is based on Hyper-v and runs common LAMP stack on Ubuntu 18.04.

On my laptop, I have set the local hosts file to point to the site domain name (i.e. testsite.local) to the local ip address of this virtual machine, and therefore, I can access the test site on my laptop without any issues.

I want to access the same site using my home office computer using the same domain name. In other words, I want testsite.local on my home office computer to be routed to the virtual machine.

Are there any way to achieve this?

Network Diagram


You can try to add a DNS server with forwarders (for internet related domains) so you can add your domain (*.local) and those will respond (as long as you configure the other machines to use your VM as DNS server as well).

I have found a great article where it explains how to use DNSMasq it's not difficult and, if you see it works, perhaps move the configuration to a real, small machine so you can setup a more secure and robust home network.

I hope this can help you solve your issue.



  • Thanks! I will try it out and see how it goes :D – K.H. Jan 10 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.