I am a total newbie to installing and working on server platform. Just to see how things work I went ahead with installing Ubuntu Server (LAMP) 11.10 on Virtualbox installed on a Ubuntu 11.10 desktop version. I used this guide Setup Ubuntu Server on VirtualBox to use as a primary dev environment for the process. I have installed a wiki software (dokuwiki) on the virtual machine as I plan to make use of wiki to keep track of my plans and activities.
In the above article, author mentions this:
For now, I can show you how to use NAT to access your server. I’m NOT a network guy… so there may be a better way. However, I believe that using NAT will keep you padded from the outside network (e.g. at home or at a coffee shot wifi, NAT should work the same in this case.)
I am using NAT configuration as of now but I want to make sure if this is the best way. As everything is only for personal/experimentation I want my wiki and other web-related software(like drupal) which I plan to setup in future on my virtual machine to be accessible only to the host machine. I neither wish to access them from outside PCs nor do I want others to have access to it. In addition I want my server OS on VirtualBox to receive regular online updates.
Therefore, can someone suggest me which network configuration must be chosen by me?
Update: As suggested in an answer I tried using Host-only adapter. After this selection, I am unable to use my wiki at all times. The problems are with:
- http://localhost:8080/dokuwiki/doku.php. This URL no longer works. Earlier while using NAT I had to enable port forwarding with these settings. I could use this efficiently.
- http://192.168.56.101/dokuwiki/doku.php. This URL works as long as I am not connected to internet from host machine. Once I connect using my USB dongle using
wvdialthe wiki becomes inaccessible.
Here are the ping results: From host:
chethan@chethan-Lenovo:~$ sudo ping 192.168.56.101 [sudo] password for chethan: PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data. ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted . . ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ^C --- 192.168.56.101 ping statistics --- 14 packets transmitted, 0 received, 100% packet loss, time 13104ms
ping 117.2xx.1xx.2xx connect: Network is unreachable