P.Hawk's picture
I recently downloaded Turnkey lampp and VirtualBox 4.04 on Ubuntu 11.04 on my laptop. My connection to my laptop is wired. I followed the instructions on this site for setting up virtual appliances using VirtualBox and the appliance's ISO and got everything to install correctly. But I can't access lampp through a web browser using my IP. I made sure to use the bridge adapter option but it seems like it doesn't allow incoming transmissions. I tried connecting from both Firefox and Chrome but couldn't connect. Is there something I missed or did wrong here? Thanks for helping
Forum: 
Jeremy Davis's picture

And is it a valid IP in your subnet? Eg if the PCs on your LAN have IPs 192.168.1.x does the IP assigned to your LAMP comply with this? If you are getting your IP via DHCP it should be ok, but to be sure, perhaps try hard coding an IP (you can do that via confconsole). Perhaps for the purpose of testing try changing to host only networking (but obviously you will only be able to connect from your host machine - you'll need to restart your VM to do this).

P.Hawk's picture

Yeah, I made sure the IP addresses I used in the web browser always matched what was in Turnkey's confconsole and my DSL modem's config screen. DHCP autooconfig works correctly if I use bridged adapter, but not when using host only networking (it doesn't give me a valid IP address and no name server IP). When configuring using host only, I tried to match the DHCP settings from my DSL modem in VirtualBox's settings but still nothing. Honestly, I'm not great on networking technology and this is the first time I've tried setting up lamp, but I'm more used to using xampp in windows. I've been at this for 3 days now and still can't get it to work..

Hey Jeremy, I read in one of your other posts somewere that you used a different VM program for your Turnkey apps. What did you use and did it allow for an easier install of your apps?


Jeremy Davis's picture

I'm assuming that your VM is at least getting LAN access as it is getting a valid IP from your router. Perhaps try pinging your host machine from within your VM (ie ping 192.168.1.x).

FYI the IP that your VM gets when you go host only should be ok even though it may seem wrong. It uses DHCP built into VBox that will create it's own subnet that just includes your VM and the host machine. So try connecting to that IP with host only.

It shouldn't be this hard! I run VBox v4.0.1 (from memory) on my Ubuntu 10.04 desktop and it just works. Install via ISO, change networking from NAT to Bridged and it's all go. TBH I suspect that there is either a bug in the version of VBox you are using or some configuration problem, either with VBox or with your host system. VBox did have a bug in a previous 3.x version that caused a similar problem, I wonder if it's a regression in the version you are using? From memory they fixed that bug fairly quickly though.

I also remember having similar problems myself with an earlier version of VBox and IIRC changing the networking back to NAT, boot VM, shutdown VM, shutdown VBox, start VBox, change back to Bridged, boot VM solved it for some strange reason.

[edit] One other thing to consider is a corrupted ISO. I have seen others with strange issues that were the result of a corrupt ISO so perhaps try verfiying the image? There is info on how to do that in the docs.

P.Hawk's picture

OK, I tried the following things:

- Pinged my (actual) IP, localhost, 127.0.0.1, and www.google.com from within the VM after exiting the confconsole. Pinging worked for all those addresses using bridged adapter but only worked for my IP, localhost, and 127.0.0.1 for the host adapter setup. In all cases, I still couldn't connect to the web interface via browser.

- Uninstalled and installed VirtualBox again using Ubuntu software center. It's still the latest version. No effect.

- I tried installing Joomla and Fileserver apps and tried using VMDK and OVF installs too, still nothing.

- I later decided to install ol' school apache2.2 and that works for me. Then I checked ubuntu networking tools and noticed something. When I installed apache, I checked the active network services in netstat and it shows a service listening on 127.0.0.1 on port 80 as it should. Nothing like this showed for Turnkey lamp when the VM was fully loaded in either network configuration (without apache2.2 installed). For a web appliance on a VM, shouldn't it show up here?

I don't really know what else to do next. I was maybe thinking of installing an older version of VirtualBox and trying that. I don't know what the problem is, hopefully not a kernel issue or something.


Jeremy Davis's picture

So can you connect to the appliance using other network tools. Ie can you SSH in? Can you connect to Webmin (doesn't use Apache)? Can you ping the server from your host machine? (Sorry if you've already tried that I can't recall and haven't read back over your posts - lazy I know...)

The ping behaviour you saw makes sense for the relevant networking setups you've used.

Perhaps try restarting apache in your VM (service apache2 restart) and see what happens. I don't understand what's going on. The fact that apache doesn't seem to be listening is not howe it should be (obviously). I would think possibly a corrupted ISO although the fact that you have tried other install methods and still doesn't work reduces the possibility of something like that. Perhaps try an older version of Vbox like you said?

Jeremy Davis's picture

NAT - VM has outgoing network connection only (similar to many consumer grade router/modems - you can port forward specific ports though if you want eg port 80 for a webserver using http).
Host-only - As the name suggests, your VM can only connect to the host (no internet).
Bridged - VM gets it's own IP and appears as an independant entity for networking purposes. IMO it is the most useful networking for a TKL VM and is what I use as a default.

Add new comment