Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a ubuntu pc with openssh server installed in my home network. I can connect via SSH to it without any problems.

Being connected, every bunch of minutes this machine is not more able to ping to any host outside, even to the internal router (which one is used for NAT at the same moment). If I would not be connected remotely during expecting those problems, I would blame the network cable or firewall; but because this very connections seems to work, I have no idea where I could search for the problem.

Any hints? Thanks!

share|improve this question
    
Collect the output of ip addr and ip route both when the connections work and when they fail. Check logs in /var/logs/ for messages that might indicate problems. –  sarnold Mar 22 '12 at 1:03
add comment

migrated from stackoverflow.com Mar 30 '12 at 1:40

This question came from our site for professional and enthusiast programmers.

2 Answers

The Linux kernel has a firewall built in to it called IP Tables. Chances are that your ubuntu install has the default iptables config that only allows packets back that originate from your machine, and ssh for remote administration. You can see what your current firewall rules are with the command sudo iptables -L.

A quick test would be to flush all of the rules, since the default behavior of iptables is to allow packets, with the command sudo iptables -F. To get your rules back, just restart the iptables service or reboot.

If you want to allow ping (ICMP) packets persistently, check out this tutorial: http://www.cyberciti.biz/tips/linux-iptables-9-allow-icmp-ping.html

share|improve this answer
    
Sorry, this wasn't the problem. As I said, the ping works most times but sometimes not. –  Andreas Mar 21 '12 at 13:44
    
Is it after the system has been idle for a while? It could be a power saving setting. –  calmond Mar 21 '12 at 15:48
add comment
up vote 0 down vote accepted

It was the IP. Another machine had the same.

share|improve this answer
add comment

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.