Jump to content

Recommended Posts

Hi !

I have the following setup in my office ! ( small office 🙂)

image.png.9833ac53117738f5b6cdd8eb40dcdf68.png

PC2 is connected to the network via cable. PC1 is connected via wifi. The ip addresses are as shown. VM Master and VM Server are created via vagrant. VM server serves the website which I can access on PC1. The host entry on widows is 192.168.2.32 mysite.com. I tried to access the website on PC2 using a same entry in the hosts file on PC2, but I am unavle to access my website on PC2. 

Please can someone suggest what must I do to be able to access mysite.com on PC2 as well as any other machine on the N/W.

Thanks loads !   

 

Link to comment
https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/
Share on other sites

Hi Requinix !

Some correction and some more info here in the new diag.

image.png.623a5c01416c6c048c6fc5fd8d210008.png

PC1 is a windows machine.

The VM's MASTER and SERVER get their static IP addresses from the vagrant file wherein they are set. 

PC1 and PC2 have the IP addresses as shown. PC2 is connected via lan and PC1 via wifi to the modem. 

The zone setting of VM SERVER is DMZ. I chose it to be DMZ since I thought that would be appropriate for the local network. The services running on VM SERVER are ssh and http. port 80 is open. See below.

dmz (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0 eth1
  sources:
  services: http ssh
  ports: 3306/tcp 80/tcp 443/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
 

15 hours ago, requinix said:

Does the VM Server have its port 80/443 exposed publicly?

The settings do expose the ports but I wonder if they are required as the site is to be accessed only locally.

I hope this can help you and other to suggest a workable solution for me to try out. 

Thanks loads !

 

 

I am not familiar with vagrant, but when I setup my virtual box VM's if I want the VM accessible from the rest of the network it needs to be configured with a Bridged Adapter for the network and have an IP on the same subnet (that'd be 192.168.1.x for you presumably, unless your using  a /16). 

 

  • Like 1

Yeah, pretty sure you've got a custom subnet for the VM images. They need to be bridged with the host so they're all connected to the same 192.168.1.x network. That's the only way anyone outside of the host will be able to connect: if they're on the same network.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.