Virtualbox and localhost question
#1

Hello

 

I'd like to know if it's possible to have the server online in a virtual machine using virtualbox and how to connect to the db or files with navicat, what IP to use? localhost, external ip or which one?

 

Also is it possible to run the server in the virtual machine and being able to connect to it while having the network adapter off? (being disconected from internet)

 

regards

#2

check the network ip adress from the machine but why you don't use hamachi ? 

 

for the adapter, i think must online or you haven't a network adress

#3
In a VM you can rebuild nearly every situation. The only Network interface which is independent of a working network interface is the loopback interface (127.0.0.1/localhost) for everything else you need an working network adapter (there are also virtual ones). This means you cant connect from outside the VM to your Server if it is disabled. But you can set up a "Host-only" or NAT Network, this means you can only connect to your VM from your Host-System/Physical Machine. With the NAT Interface your machine also gets acces to the Internet, but you cant route traffic to a NAT Network if I remember right. To make your Server accessible from the Internet you need a Bridged Network and you have to edit the routing tables in your router to route the incomming traffic directly to your VM. The IP should be an dynamically one at default. You could get get it with the command "ifconfig".

#4
But the thing is I won't be able to connect if the adapter is off right? What I specially need is the host machine to be off from the internet and i have 2 network connections so I can just enable one for the VM but again I need the host machine to be off, it won't connect in any way with localhost or anything while the host machine is off?

#5
If your Host machine is offline and you want to use an "Host-Only" Network, it doesnt matter, because your VM have its own Virtual Network Adapters. So it works if you want to run the server in your Linux VM, and play from your Windows Host for example.

#6

If your Host machine is offline and you want to use an "Host-Only" Network, it doesnt matter, because your VM have its own Virtual Network Adapters. So it works if you want to run the server in your Linux VM, and play from your Windows Host for example.

 

How can I make it work then? which IP should I use to connect from my offline windows host to the VM where the server is? I tried using 127.0.0.1 in navicat and it doesn't connect



Forum Jump:


Users browsing this thread: 1 Guest(s)