Hello everybody.
I have Virtualbox 4.3 installed in a Window 8.1,
I created a Vm with Linux CentOS 5.11 (the last 5). Both, Windows & Linux have fix IP, and the VM IP is same range that my network. All the computers in the network find the VM with a ping and also they can access to with the browser, so the Linux is working. The network type assign to the VM is bridge.
But when I go to my router to assigng the 80 port to the VM to give access to Internet I don't find in the router the VM name or VM IP address.
I want the Linux VM to work like Web Server and do it accesible from Internet.
1) Anybody can say me what I'm doing wrong?
2) There is some document that show me, step by step, in clear way, how I must to do this?
Regards everybody. Any help welcome.
Installing a web server in a VM
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Installing a web server in a VM
That really has nothing to do with VirtualBox. If you can ping the vm the networking setup must be OK.
How you configure port forwarding depends on your router, and it would be exactly the same whether the machine was virtual or physical. The networking protocols have no idea that the target is virtual. It is just another IP address.
How you configure port forwarding depends on your router, and it would be exactly the same whether the machine was virtual or physical. The networking protocols have no idea that the target is virtual. It is just another IP address.
Bill
Re: Installing a web server in a VM
Hi, Thanks for your answer.
Now, my router find the VM, but after I, manually add the VM and I give the same mac address that have the host machine.
But yet I have conectivity problems, if I try to see the web page the from Internet the brownser display a timeout message and the port forwading in the router is properly defined. Port 80 with tcp & udp pointing to VM IP.
I suppose that must exist a tutorial of how to do this properly, because I think that I need only a little thing that I don't know to make this work.
Regards & thanks again.
Now, my router find the VM, but after I, manually add the VM and I give the same mac address that have the host machine.
But yet I have conectivity problems, if I try to see the web page the from Internet the brownser display a timeout message and the port forwading in the router is properly defined. Port 80 with tcp & udp pointing to VM IP.
I suppose that must exist a tutorial of how to do this properly, because I think that I need only a little thing that I don't know to make this work.
Regards & thanks again.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Installing a web server in a VM
Very bad idea. mac addresses must be unique or the LAN can stop working due to conflict.I give the same mac address that have the host machine.
Re: Installing a web server in a VM
Thank for your coment, but read this, You can find the document here https://www.virtualbox.org/manual/ch06.html
Note
Bridging to a wireless interface is done differently from bridging to a wired interface, because most wireless adapters do not support promiscuous mode. All traffic has to use the MAC address of the host's wireless adapter, and therefore VirtualBox needs to replace the source MAC address in the Ethernet header of an outgoing packet to make sure the reply will be sent to the host interface. When VirtualBox sees an incoming packet with a destination IP address that belongs to one of the virtual machine adapters it replaces the destination MAC address in the Ethernet header with the VM adapter's MAC address and passes it on. VirtualBox examines ARP and DHCP packets in order to learn the IP addresses of virtual machines.
So, maybe is not so bad idea, and from the time that I do this my router see the VM
Regards.
Note
Bridging to a wireless interface is done differently from bridging to a wired interface, because most wireless adapters do not support promiscuous mode. All traffic has to use the MAC address of the host's wireless adapter, and therefore VirtualBox needs to replace the source MAC address in the Ethernet header of an outgoing packet to make sure the reply will be sent to the host interface. When VirtualBox sees an incoming packet with a destination IP address that belongs to one of the virtual machine adapters it replaces the destination MAC address in the Ethernet header with the VM adapter's MAC address and passes it on. VirtualBox examines ARP and DHCP packets in order to learn the IP addresses of virtual machines.
So, maybe is not so bad idea, and from the time that I do this my router see the VM
Regards.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Installing a web server in a VM
I see that it tells you what VirtualBox is doing but nowhere do I see it telling you to use the same mac address on the guest. Oh well you know what it is you want.