Weird server behavior...

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Ok, the server I run from home I built using the guide posted here on building a Debian server.

Check out this situation i am getting with it, which at first I thought was due to bad router, and then a bad NIC, but so far, still the same.

My web server is accessible all the time from any computer on the same "network". However connection to any requests from outside the network will, for a lack of better way to describe it, time out. After inactivity of the server, you just cannot access it via web or ssh.

Now check this out. If i make a connection to the server from inside my network via SSH, (don't even need to log in, just start the connection), and the server is now accessible from the "outside". This has been extremely re-creatable, with the same results. Even our IT at work is puzzled.

The pain in the rump at first was that I didn't realized what was "turning it back on", which made a lot of trouble shooting confusing for wrong results.

My first though was DynDNS was screwing up. but even going to the IP address failed. So then i thought the router which was doing port forwarding was bad, so I did DMZ. Then when it was still acting up, I directly plugged the server into my modem. The fact that I pay for business class road runner eliminates the possibility of the ISP blocking the ports.

Finally, thought maybe since it was the built in network card on the biostar motherboard, it was glitching. SO this weekend, I put a known good 3Com NIC in it.

Still the same!!!!

Again, all i have to do is start a ssh connection while remote desktop into my windows server and from work (or any other location), the web page and/or ssh connection will start working.

Because the server is plugged directly into the modem, it is currently set up with DHCP (I already pay $90/month for roadrunner, not paying the extra $40 a month they want for a static IP address!), but got same results when I used a static IP address behind the router.

For now, since just starting a SSH "wakes it up", I have set my windows server to start a SSH login to the Linux server every 5 minutes, and let it time out from not logging in. Been live all day...

Anyone have any suggestions what to check?

Thanks.

-Greg

They have: 121 posts

Joined: Dec 2008

Interesting...

Long shot:
What DNS servers does your server employ? Confirm it can access them, and query them? SSHd does reverse lookup on connecting clients before allowing connection. If it cannot connect to the specified DNS servers, it will often appear as a timeout.

If it did fix the problem, I'd have trouble explaining why the 'wake up work-around' you've been using works...

Also - anything appear in your system logs? Specifically during the time period of a 'timed-out' connection? sshd will likely write to /var/log/messages and /var/log/auth.log (or similar)

Cheers,
Shaggy.

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Do you have any rules in iptables?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.