Author Topic: [SOLVED] how can I see my local web server which is in virtualbox  (Read 897 times)

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
I have a website which had the primary server at my friends but now I have moved it home and can not access it on my local network. I can access it externally but this makes updating it difficult.davesmuscletherapy.com
From what I have seen a different modem with nat loopback is what I need, but it seems hard to find up to date information on this.
Is it possible to do it in linux
My modem is a billion bipac 5200

thanks for your help

Dave
« Last Edit: September 04, 2011, 06:09:50 AM by spottyrover »
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: how can I see my local web server (virtualboxed)
« Reply #1 on: August 29, 2011, 04:08:31 AM »
I have a website which had the primary server at my friends but now I have moved it home and can not access it on my local network. I can access it externally but this makes updating it difficult.
From what I have seen a different modem with nat loopback is what I need, but it seems hard to find up to date information on this.
Is it possible to do it in linux
My modem is a billion bipac 5200

thanks for your help

Dave

Hi Dave,

your modem/router is logically placed in the mid between your local network and the internet, and should not affect your local network connectivity in any way.

Also, define "I can access it externally": externally to your LAN or externally to virtualbox environment ?

AS

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how can I see my local web server (virtualboxed)
« Reply #2 on: August 29, 2011, 04:56:19 AM »
I can access it using a 3g modem  on different computer to access it via the internet.

thanks
Dave
« Last Edit: August 29, 2011, 05:07:47 AM by spottyrover »
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: how can I see my local web server which is in virtualbox
« Reply #3 on: August 29, 2011, 01:01:33 PM »
More details and info are necessary to provide some help around your issue.
Do you have a firewall enabled on the guest (or on the host) ?  Can you ping your guest machine from your LAN ?
How did you set up your guest nic ? Bridged ? Did you used a DMZ ? .... other relevant info ?

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10646
  • MLUs Forever!
Re: how can I see my local web server which is in virtualbox
« Reply #4 on: August 29, 2011, 02:10:20 PM »
What about sharing the web server location with the host for access?  ....  maybe I am misunderstanding the problem ....  :(
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how can I see my local web server which is in virtualbox
« Reply #5 on: August 29, 2011, 08:01:20 PM »
I have tried to disable both the modem and pclinuxos firewall.
I can ping the virtualbox guest successfully.
The virtualbox guest is setup as in bridged mode.
No dmz is set up.
The modem uses virtual servers which point to the ip of the guest on port 80

"What about sharing the web server location with the host for access?  ....  maybe I am misunderstanding the problem ....  "

I have tried this by adding 10.3.1.200 davesmuscletherapy.com to /etc/hosts but I can only access the first page.

Thanks
Dave
« Last Edit: September 04, 2011, 06:00:53 AM by spottyrover »
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: how can I see my local web server which is in virtualbox
« Reply #6 on: August 30, 2011, 01:58:59 AM »
I have tried to disable both the modem and pclinuxos firewall.
I can ping the virtualbox guest successfully.
The virtualbox guest is setup as in bridged mode.
No dmz is set up.
The modem uses virtual servers which point to the ip of the guest on port 80

"What about sharing the web server location with the host for access?  ....  maybe I am misunderstanding the problem ....  "

I have tried this by adding 10.3.3.100 davesmuscletherapy.com to /etc/hosts but I can only access the first page.

Thanks
Dave

The fact you can ping your guest means your that your guest can correctly answer to a LAN request.
(you can also try a different server on your guest, i.e. ssh server and check if you can connect your server from LAN).

If you point your host browser to the guest IP:port, are you able to see your home page ?
(try it using the IP address)

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how can I see my local web server which is in virtualbox
« Reply #7 on: August 31, 2011, 04:28:33 AM »
thanks for all of your help.
I can ftp into the virtualbox image
So now I am a bit confused as to what and if this nat loopback would do anything.
Since this was set up by my friend I will have to get back to him when he comes back from holidays.
I was hoping some one might pick up on an error with the /etc/hosts file or may know of something else I could do

thanks again

Dave
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: how can I see my local web server which is in virtualbox
« Reply #8 on: August 31, 2011, 04:38:10 AM »
thanks for all of your help.
I can ftp into the virtualbox image

I would say that your issue is restricted around the http server configurations, may be there is some setting that not allow local access.

Quote
So now I am a bit confused as to what and if this nat loopback would do anything.
Never heard about nat-loopback, instead I heard about (and sometimes used) nat-traversal that's required to run client software, i.e. IpSec VPN clients, when the client is behind a nat router/firewall.

Even if you are using NAT for your LAN, your virtual server LAN IP need to be directly mapped to the public IP, implicitly it's not behind the NAT.

Quote
Since this was set up by my friend I will have to get back to him when he comes back from holidays.
I was hoping some one might pick up on an error with the /etc/hosts file or may know of something else I could do

thanks again

Dave

Let us know about.  ;)

AS

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how can I see my local web server which is in virtualbox
« Reply #9 on: August 31, 2011, 07:53:10 AM »
If I remember correctly he was using a Netgear DG834G  but that stopped working not long after he moved. Now he has a billion which he's still learning about.

more info on nat loopback if your interested
http://opensimulator.org/wiki/NAT_Loopback_Routers

thanks for all of your help

Dave
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: how can I see my local web server which is in virtualbox
« Reply #10 on: August 31, 2011, 07:59:23 AM »
If I remember correctly he was using a Netgear DG834G  but that stopped working not long after he moved. Now he has a billion which he's still learning about.

more info on nat loopback if your interested
http://opensimulator.org/wiki/NAT_Loopback_Routers

thanks for all of your help

Dave



Thanks about the info:
Quote
Many DSL routers/modems prevent loopback connections as a security feature. This means that a machine on your local network (e.g. behind your DSL router/modem) cannot connect to a forward facing IP address (such as 199.149.252.44) of a machine that it also on your local network. Connecting to the local IP address (such as 192.168.2.40) of that same machine works fine.


It's beyond me why a LAN client should access a LAN resource passing through Internet, but I'm not a web server expert.  ;)

AS

Offline spottyrover

  • Full Member
  • ***
  • Posts: 80
Re: how can I see my local web server which is in virtualbox
« Reply #11 on: September 04, 2011, 06:00:09 AM »
Thank you all for your help
I got my 3g modem back to test that I could indeed access my site only to find that I could only see my front page and when I tried to access the other pages it just looped back to the home page. So I went back through my backup virtual images and found one which worked properly.
Once I could access all of the pages via the 3g I then added
10.3.1.200 davesmuscletherapy.com  the /etc/hosts file  so that it now looks like
 
# generated by drakconnect
127.0.0.1 localhost.localdomain localhost
10.3.1.200 davesmuscletherapy.com
10.3.1.200 mail.davesmuscletherapy.com

Note the modem has virtual hosts which redirects all port 80 requests to the ip 10.3.1.200

So now it all works

thanks again for all of your help
sorry that I wasted your time.
I hope that this helps others.

Dave
« Last Edit: September 04, 2011, 06:02:38 AM by spottyrover »
pclos 32bit lxde (fast), kernel 3.2.18-pclos2.pae, AMD Athlon(tm) II X4 620, nvidia gforce 8400gs driver 310.19-1pclos. 12 gig ram
Favorite software tvheadend / Xbmc