Roots Discourse

Public Networks?


#1

Wondering how i can setup a public network so i can access the VM in the local LAN.

Added this.
config.vm.network :public_network

After running vagrant up, SSH in and checked ifconfig and got this:

enp0s9    Link encap:Ethernet  HWaddr 08:00:27:42:cf:af
          inet addr:192.168.1.87  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe42:cfaf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:116 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15045 (15.0 KB)  TX bytes:2160 (2.1 KB)

Tried accessing 192.168.1.87 in the browser but i can’t see to access it.

The 192.168.1.87 page isn’t working
192.168.1.87 didn’t send any data.
ERR_EMPTY_RESPONSE

#2

Did you figure something out?
I have the same question, how to access the development site from other machines on the LAN. I tried to add port forwarding on the VM with ports 80 and 80 (in and out), with and without the guest ip address specified but could not get it to work.
I am not using Sage so I don’t think the browsersync method will work for me (mentioned in another post).