|Hello. Here is my situation:|
- I have your average LAMP server (running Ubuntu Hardy Heron) on my local network.
- My router is a DLink DI-624 (Revision C).
- The server is assigned an IP via DHCP, not static.
- I have ports 22 (for SSH) and 8000 (for HTTP, cuz my ISP blocks 80) forwarded to my server box.
I got this setup working, so I'm guessing I have the basics right. The problem is that my server frequently "stops responding" for short periods of time. Basically, when I try to access the server externally (whether via an HTTP request or an SSH connection), it will work at first, but then within a few seconds, SSH connections fail and HTTP requests hang. Then a few minutes later, the server will come back online.
When my server is "down," I am successfully able to ping my router externally. Furthermore (and this is where it gets really weird), when my server is "down" and I ping my router FROM THE SERVER BOX, the connection is INSTANTLY restored. So basically, from within my network I tried the following:
- Access a web page on the server. It works.
- A few seconds later, try to access a different web page on the server. It hangs...
- While the browser is trying to load the hanging web page, I ping the router from my server using an internal SSH connection.
- As SOON as I ping the router from the server box, my browser loads the web page successfully.
One of my co-workers said that it might have something to do with the fact that my server's IP is using DHCP and is not static. Does anyone have any idea what the problem could be and how I can fix it? Is my router just broken?