access private VM from other computer over wifi

后端 未结 4 1356
孤街浪徒
孤街浪徒 2021-02-04 06:26

I have a private network VM for developing on my mac. I\'d like for my android device to be able to communicate with the VM on my mac. Currently I can visit the IP defined in my

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 06:47

    You are using a Private Network IP which is only accessible by the Host machine (NOT visible to other machines even they are in the same WLAN).

    In your case, the best choice is to use Public Network (bridged) so that your Android device can access it.

    add config.vm.network "public_network" in your Vagrant file in the config block.

    BTW: the default NAT mode is fine but you'll have to set proper port forwarding rules for each service you want to access (e.g. SSH, HTTP, HTTPS etc...).

提交回复
热议问题