Accessing a web server on a Virtual Machine from another computer - networking

I have setup a Virtualbox with a Linux environment running a web server. The host is running Windows 7, and I can access the web served by the server in the virtual machine from the host's browser.
However, I would like to be able to access this web server from another computer; say, a colleague on the same network that the host is in. Is there a way of doing so?
Summary:
Host (win7) interfaces:
- 172.16.1.15 (internet facing)
- 192.168.55.1 (VM facing)
Guest (linux with web server running) interface:
- 192.168.55.2
Web server is reachable from Host (through 192.168.55.1 - 192.168.55.2 interface)
Web server is NOT reachable from other computer on 172.16.1.X network.
Can you guys help me out on what I may be able to do in order to achieve this?
Thank you!

Well, despite downvotes without any kind of explanation why (thank you!), I have found a way of doing what I intended on Virtualbox settings:
On machine, right click, Settings > Network > Advanced > Port forwarding, and then, fill with corresponding data, i.e.:
host ip could be 0.0.0.0,
host port should be the port other users will use to access your computer (and thus the VM),
guest ip is the VM ip, and
guest port should be 80 if it is a web server typically).
Thank you, hope this helps to the next one running into this!

Related

Accessing a local website from another computer inside the local network in IIS 10

On my computer I have deployed my web site on IIS. If I access this website locally with :8080 works perfect, but when I try to access this site from another machine or my Android phone I get 'The site can't be reached. my_ip_address took too long to respond ERR_CONNECTION_TIMED_OUT –' this error.
I have tried solutions from this question, but nothing worked for me. Need some help!
There are few factors which can affect the accessibility of the site hosted on your local computer:
Is the client machine (including your phone) in the same network as the Server (In this case your site)
Is the firewall configured to allow connections on port 8080
Have you tried accessing the server using the IP Address. For e.g. http://192.168.0.1:port
Steps to isolate
Ping the server Ip from the client machine and see if it is able to connect to it.
ping 192.168.0.1
If the above fails, then I would assume that you are not on the same network. If it succeeds then check if the port is open.
You can also use nmap to see whether the ports are open or not
nmap -p 8080 kaushal.com
If the above fails, then open the port in your Firewall configuration and then try again.
Try this and share the results.

Making websites hosted in localhost "port" available to all on network

I have a website hosted in IIS in my local PC.
I can access to my IIS from other computers in the network by typing in http://my_lan_IP. However, when I try to get access to a specific port (http://my_lan_IP:8888) in my local PC, it says the "The site can't be reached."
I disabled all my firewalls and even tried allowing the specific port through Windows Firewall, but it didn't work. Viewing my IIS hosted site on other machines on my network
Thanks so much for your help :)
FYI: I am using Windows 10. My goal is to connect to the locally hosted ASP.NET website from other machines on the network.
Your web server needs to be configured to serve HTTP on port 8888 "for that particular website", in order for a client to connect to that port.
By default, your website is served on port 80, which is omitted from normal addresses. All http web addresses, if not specifying a port, is actually running on port 80, or 8080.
Your windows firewall will not effect local connections you make to your own pc. Get it working on your own machine, and then worry about firewalls that block connections from other machines on the network.
I was able to solve the issue by configuring a host header for a website. Thank you all for your help :)
https://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx

HTTP request from one Virtual machine to another

I have started 2 virtual machines in my computer (using VirtualBox on Windows 8.1) in same time. On first i have Linux Debian with Apache http server. On second running Windows XP. Both networks are set as NAT.
Http request must have specific URL (for example: "xxx.local"). So when I try connect from my real computer to virtual machine with Linux server its easy and its work, there I add only redirect for domain "xxx.local" to virtual machine IP and everything working fine.
But I need send request and receive reply from second virtual machine with Windows XP.
Is there any way to do that?
You can add additional network adapters to both VMs attached to one host-only network.
Ok I got it. There is important to set "host only network adapter" for both virtual machines (but not the same one!) with same IP radius. Then you set IP of server machine to target domain in host file and that is all.
Works fine :-)

Configuring vmware networking to access static IP

I have a dedicated virtual debian server running with my website, and now have a copy of that so that I can try some configurations by running it virtually on my own PC. It runs fine, but I'm unable to access the machine through http.
The problem is that my machine has a fixed ip, something like 194.247.x.x . My home network however has computers in the range of 192.168.1.x
Is it possible to not change anything in my virtual machine and still configure vmware networking so that I'm able to access the websites it's running?
The only way I can see this happening for you is to use NAT (Network Address Translation) between your home network and your VM.
To do this, you could use a free software based router - something like Vyatta (www.vyatta.org) - and create a VM with two NICs - one with an IP on your home network, and the other with an IP on the same network as your VM. You then configure NAT to translate your home IP to your web server IP and then you're done.
There's nothing 'de-facto' VMware that will allow you to do this (other than using vShield - which will do NAT'ing anyway)...

ASP.NET - Virtual PC

I have created an ASP.NET application on my local machine. In order to test this application in IE 6, I have created a VPC. I am trying to connect to this web application through the VPC. However, I cannot connect to it. I can however connect to the internet.
What am I doing wrong?
Can you ping from the virtual PC? If not, you have network configuration issues.
Otherwise, check firewalls, and make sure that port 80 is open and sending traffic to IIS.
there are many possibilities. first I'd consider would be any firewall rules on the ASP.NET side preventing incoming HTTP connections.
What is the URL you are using to go to your site? If you are using localhost, you will need to change that to the actual IP address of your development machine, as localhost on the Virtual PC image will be a different IP address than localhost on the development machine.

Resources