Originally Posted by greendragons
I want to setup server on host and test it from guest... for learning purpose...
how to configure it to connect to host... the blue screen at the bottom shows that it is connected to the host...but i can't ping... i tried to configure using netconfig but i couldn't succeed...
OK - couple of things.
Because you want to test a host application from your guest. Then NAT will not be the ideal solution. Vbox has something perfectly suited to what you want. BTW did you read the chapter 6?.
First - CHANGE YOUR NETWORK ADAPTER TYPE from "Intel Pro 1000MT" to something a lot simpler - I suggest PCnet-PCI II (Am79C970A) BECAUSE - (and it's only a guess) slackware may not support the more advance gigabit adapter. Start with the "lowest common denominator first" is a good adage. The Am79C970A is much older - and therefore more likely to be supported by older distros. From Chapter 6 ---
The PCNet FAST III is the default because it is supported by nearly all operating systems out of the box, as well as the GNU GRUB boot manager. As an exception, the Intel PRO/1000 family adapters are chosen for some guest operating system types that no longer ship with drivers for the PCNet card, such as Windows Vista
Second - LEAVE IT AT NAT - boot the system (and I mean boot/Start - don't restore a SAVE) and then just run a web browser... any web browser. If you can "see the outside world" - browse a page or two - then the adapter is working.
You know you can RIGHT click the little blue screen icon at the bottom of your VM encompassing window - the one for networks - and then you can change SOME things - while your VM is running - like you can connect/disconnect the cable. Just like you can in real life.
There is a "mini dhcp server" built in to the VM when you run it with NAT (it is turned off for bridged networking -- coz it assumes you will either use a static IP or you have a DHCP server somewhere on your REAL network. AGAIN - from chapter 6
The virtual machine receives its network address and configuration on the private network from a DHCP server integrated into VirtualBox. The IP address thus assigned to the virtual machine is usually on a completely different network than the host. As more than one card of a virtual machine can be set up to use NAT, the first card is connected to the private network 10.0.2.0, the second card to the network 10.0.3.0 and so on.
The virtual dhcp server and DEFAULT GATEWAY is 10.0.2.2
Your VM machine's address will be 10.0.2.x - where x >3
(address 10.0.2.3 is reserved for a virtual tftp server - in case you wanted to network/PXE boot your os)
The address of your host from inside the VM will be 10.0.2.2
So, if you had a webserver running on your host at port 80 then to access it from within your VM you would use http://10.0.2.2:80
When your VM is running with NAT it is insulated from the outside world and from your host. This is why it is the default (and safest). You can "get to it" by using the "port mapping" facility. BUT NOT WITH A STANDARD PING.
However, as suggested by other contributers - you may want to use BRIDGED rather than NAT for reasons outlined in chapter 6
of the virtualbox manual.
Some people would setup a new/development server - e.g. sql server or web server in a VM and test that way. One could even setup a "suite of machines" clients and servers in a group of VM's - all of which can "see each other" in their own private network.
I STRONGLY urge you to read
chapter 6 of the virtualbox manual.
If I have helped - can you "click my rep" and indicate that I have done so.