ajoo Posted August 26, 2020 Share Posted August 26, 2020 Hi ! I have the following setup in my office ! ( small office 🙂) 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 !    Quote Link to comment https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/ Share on other sites More sharing options...
requinix Posted August 26, 2020 Share Posted August 26, 2020 Did VM Server get its IP address from the same place that PC1 and PC2 did? Does the VM Server have its port 80/443Â exposed publicly? Quote Link to comment https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/#findComment-1580993 Share on other sites More sharing options...
ajoo Posted August 27, 2020 Author Share Posted August 27, 2020 Hi Requinix ! Some correction and some more info here in the new diag. 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 !   Quote Link to comment https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/#findComment-1581004 Share on other sites More sharing options...
kicken Posted August 27, 2020 Share Posted August 27, 2020 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).  1 Quote Link to comment https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/#findComment-1581009 Share on other sites More sharing options...
requinix Posted August 27, 2020 Share Posted August 27, 2020 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. Quote Link to comment https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/#findComment-1581015 Share on other sites More sharing options...
ajoo Posted August 29, 2020 Author Share Posted August 29, 2020 Hi Kicken and Requinix,  I will revert once I get it working. Thank you both.   Quote Link to comment https://forums.phpfreaks.com/topic/311395-accessing-site-on-a-nw/#findComment-1581031 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.