title: Does TCP keepalive refresh the timeout on a NAT?
body: <p><a href="https://stackoverflow.com/a/1480267/2098939">I've read</a> that NAT routers &quot;assume a connection has been terminated if no data has been sent for a certain time period.&quot;</p>
  <p><a href="https://www.rfc-editor.org/rfc/rfc1122#page-101" rel="nofollow noreferrer">I've also read</a> that TCP keepalive packets usually shouldn't contain any data.</p>
  <p>So my questions are:</p>
  <ol>
  <li>Are the above statements true?</li>
  <li>Do NAT routers consider empty TCP keepalive packets when reordering/cleaning their tables?</li>
  </ol>
  <p>I'm asking this because I need a reliable connection between two endpoints where both of them have to be able to detect and react to connection problems. I know that I might just implement a keepalive mechanism myself but I want to know whether the TCP implementation <strong>could</strong> be used for that.</p>