0

I need to be able to access localhost from host machine (macOS) on Arch server (guest virtualbox machine).

I was able to edit /etc/hosts to access localhost on guest machine via IP:port on browser on host. However, the webapp was configured in such a way that only by passing localhost as the domain will it be able to access all resources on the server.

I turn the Network adapter on Virtualbox to be Bridged Adapter

To illustrate what I meant, :

Host IP: 10.0.0.1/24 Guest IP: 10.0.0.2/24 Default gateway: 10.0.0.24/24

From browser on Host : I can access Guest by typing 10.0.0.2:1234 in browser.

What I want is to be able to type localhost:1234 in the Host browser and still can access Guest localhost.

How may I do that?

Details: Host : macOS Sierra Guest: Arch 4.20.10

  • 1
    It sounds like you want to set up some sort of tunnel from port 1234 on the macOS system to the guest machine's port 1234. localhost will always be the machine that the browser is running on. – Kusalananda Feb 22 at 8:15

Your Answer

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

Browse other questions tagged or ask your own question.