PDA

View Full Version : [other] Feelin Like A N00b, no web server access



dankap99
December 21st, 2010, 10:27 AM
I have an Ubuntu server up and running, got all my html, css etc files in my /var/www, got external ip, opened up ports 21, 22, and 80 on my router, removed the firewall from the machine on the router, no firewall on the box itself. Got my lamp action on, openSSH, the whole shabang. When i go to the local ip (192.168.1.x) i can get to everything no problem. But when i try the external ip all i get is timeout error.

Is is a problem that i'm running the server in a virtual machine (vmware fusion, network bridged), or am i missing something? any help is greatly apprecitaed.

(I'll make the external IP available if requested)

spynappels
December 21st, 2010, 02:39 PM
Is port 80 blocked by your ISP?

dankap99
December 21st, 2010, 08:19 PM
i'm not sure. but would they also be blocking 22? i cant event ssh into it. i have att btw

J_5
December 21st, 2010, 09:24 PM
Did you port forwarded the ports that you opened up to point to your internal IP?

msandoy
December 21st, 2010, 09:28 PM
Make sure you have the VM use bridged adapter, not NAT. Set it up with fixed IP, not DHCP. Direct port forwaring in your router to the fixed IP of your VM. This should work, unless your ISP is blocking you.

It might clear things up, if you do an nmap on both your internal IP and on your external IP, and post the output.

windependence
December 21st, 2010, 09:29 PM
You will not be able to reach your site from the inside with the external IP unless your router supports NAT reflection (and most don't). You need to edit your hosts file (on the client machine, NOT your server) and add an entry for your external DNS name, for example:



xxx.xxx.xxx yourdomain.com

-Tim

dankap99
December 21st, 2010, 09:47 PM
J_5, i have this "machine" totally open on my router, all applications allowed, all ports open, no firewall.

Msandoy, my internal nmap shows 22 and 80 open, but the external nmap shows all 1000 scanned as filtered.

and windependence, i've had a couple friends try to get to it, and i've tried from my phone over 3g as well.

the external ip is 99.188.51.212 if that'll be at all helpful

msandoy
December 21st, 2010, 09:50 PM
This might be a stupid question, but have you tried rebooting your router after doing changes?

You could try to set DMZ in your router to your internal VM IP, just for testing. It is not recommended to run like that.

Btw, nmap is telling you that all ports are leading nowhere at the moment. I'm guessing the configurations have not been activated.

dankap99
December 21st, 2010, 09:55 PM
just set it to dmz, rebooted the server, and i can get to it over 3g.

could someone else please verify that they can get to it too?

msandoy
December 21st, 2010, 09:58 PM
If you do another nmap on your external IP, it should tell you port 22 and 80 are open, if it worked.
Btw, I'm on my work computer at the moment, will be on my own computer later, and I can test it then.

dankap99
December 21st, 2010, 09:59 PM
did that right before i saw ur reply, got 22 and 80 open

dankap99
December 21st, 2010, 10:00 PM
so it works for about a minute, then i cant connect to it any way i try. i re-set it to dmz, then reboot the server, then i'm good for another 2 mins or so. wha...?

msandoy
December 21st, 2010, 10:38 PM
Try rebooting the router after setting the DMZ. Your router might need a reboot to accept new settings.

dankap99
December 22nd, 2010, 03:58 PM
so i spent a few hours last night working on this, and i dont think it's my router.
after many reboots and settings re-sets and server reboots etc. i realized that all my VMs are dropping internet connection pretty quickly inside vmware. i'm thinking of building a real machine as a testbed anyways, so maybe i'll just try this all over again on a real box. you guys have been super helpful thanks so much! :D

CharlesA
December 22nd, 2010, 04:29 PM
Good luck. I haven't had any problems with using a VM as a test server, but everyone's environment is different.

dankap99
December 22nd, 2010, 05:14 PM
do you use vmware or virtual box? alot of my friends use virtual box, i've just never had a reason to make the change.

CharlesA
December 22nd, 2010, 05:55 PM
I've been running VirtualBox, as that's what I am most familiar with. I have most of my VMs on one machine, and connect to them over the network.

There really shouldn't be much difference between VMware and Virtualbox, as long as you have your VMs set to use bridged networking.

msandoy
December 22nd, 2010, 06:18 PM
I have a few VM's running in Virtualbox, and I have never had this problem with dropping of network.
Please post back if you find the problem with VMware.

windependence
December 22nd, 2010, 06:40 PM
do you use vmware or virtual box? alot of my friends use virtual box, i've just never had a reason to make the change.
I have several production servers running on VMware and I have never had this problem in 4 years . Do check your NIC settings though in VMware and make sure they are live. Right now I'm also at work but later I may be able to get into my VMs and tell you what to check. Also check port acces using canyouseeme.org.

-Tim