0

I have a Ubuntu 18 Server as VM on my local PC running different webservices, for testing. The VMs /etc/hosts has several entries for the names of those services. To test them i'd like to use a browser on my local PC and access them via the virtual address given by the VirtualBox-Network-Adaptor.

Unfortunately the webservices delivers content which also has their service-names inside the data. The browser-app (AngularJS) then uses those names to access the several services. This fails, because the browser is getting DNS from global nameservers in our network.

Now i'm looking for a way to make the browser (Windows 10) resolve the names from the VMs /etc/hosts file, but did not found a way yet.

Neither the Proxy nor the NAT-functionality of VirtualBox is useable here, they are only good for the VM itselft, not the "outside" world :-)

3
  • Did you try to setup your windows hosts file accordingly?
    – Seth
    Commented May 31, 2019 at 11:02
  • Oh, yes, i did (forgot to mention this) but as i need Administrative rights and it will stay on the host, whereas the VM may be moved to another, this is not the way i want to do. I also don't think messing with the Windows hosts file is proper way, either.
    – T-Regex
    Commented May 31, 2019 at 13:08
  • In that case get a proper Test Environment and change the test Environment DNS entries accordingly. You want local Name resolution in which case the hosts file is the proper option. Alternatively package a DNS server and change your network configuration to use it instead of any other DNS.
    – Seth
    Commented Jun 3, 2019 at 5:26

0

You must log in to answer this question.

Browse other questions tagged .