Erratic Router Port Fwding Behavior

Dlink / Di-624 rev. c
February 18, 2009 at 13:31:24
Specs: N/A, N/A
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?


See More: Erratic Router Port Fwding Behavior

Report •

February 18, 2009 at 14:03:29
I think your co-worker has a point. Try a static IP first. I don't like using DHCP for small networks. I don't know why people insist on it.

Report •

February 18, 2009 at 14:11:32
You have two issues here.

One is port forwarding with does not work with dhcp. Port forwarding it to a particular ip address.

Your test of access a web page and then pinging is all done locally, correct?

Your router has nothing to do with this. This would indicate an internal server misconfiguration.

Report •

February 18, 2009 at 14:28:54
Thanks for the replies. I will try assigning a static IP.

wanderer: I was testing internally, and I had an SSH connection to my server using its network IP, but my web requests to it were external, I believe. Because I have a dyndns account mapping a hostname to my external IP... so it should be external, unless that's not how it works. Sorry for not making this clear first.

Report •

Related Solutions

February 18, 2009 at 16:27:04
I think that is a nice idea using external but since you were doing it from the lan, lan name resolution would take presidence not the wan name resolution.

Simple test: disconnect the wan cable and then see if you get the same results as before. If so you are only doing local resolution and not using the web.

Report •

February 18, 2009 at 21:55:27

I set up static IP, and it works like a charm. Thanks for everyone's help!

Edit: Actually, it turns out it's still having problems. I don't really want to spam this thread, so I won't bring it back, but just in case someone else sees this in the future, this problem was not resovled.

Edit 2: Actually, I tried turning off the wireless radio, and it hasn't gone down since. So maybe the wireless part of the router was messing everything up.

Report •

Ask Question