Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I got a strange problem with the network connection of a Centos 6 server: From LAN everything works as expected (SSH, httpd) but outside connections fail if the server has been idle for a few minutes. After sending a ping from another computer over lan, outside connections work as long as the server isn't idle. Some minutes later the server stops responding again.

The router configuration/port forwarding should be ok (connecting to a nas in the same network never failed) and over lan there haven't been any problems.

Does anyone know what i could have missed in the configuration that causes this behaviour?

share|improve this question

2 Answers 2

Check the connectivity between your server and its default gateway:

  • do you see the MAC of the server in the gateway's ARP table? Is it the correct MAC?
  • do you see the MAC of the gateway in the servers' ARP table? Is it the correct MAC?
  • are other hosts experiencing the same issues?
  • does a "clear arp-cache" or similar on the default gateway temporarily solves the issue?
  • if the default gateway is a Cisco router, is CEF functioning as expected (if enabled)?
share|improve this answer
    
I checked the MACs and cleared the arp cache, but no change so far... –  Ruu Nov 8 '11 at 17:32
    
i also didn't find any similar issues on other hosts –  Ruu Nov 8 '11 at 17:34

Probably there's a network element which drops idle connections when you connect from outside. You can work around this by adding keep alive to your ssh_config:

ClientAliveInterval 300
ClientAliveCountMax 1000
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.