title: How to view/change socket connection timeout on Linux?
body: <p>When creating a Socket in Java:</p>
  
  <pre><code>new Socket(host, port);
  </code></pre>
  
  <p>The Socket constructor will try to connect to <em>host:port</em> before returning.  On Windows, this fails almost immediately for unreachable hosts but for Linux it can take up to 5 minutes for the Socket to timeout.</p>
  
  <p>I'm aware that if I have control over creating the Sockets, I can do:</p>
  
  <pre><code>Socket s = new Socket();
  s.bind(..);
  s.connect(.., timeout);
  </code></pre>
  
  <p>but I'd rather have the OS use a reasonable default value.  Is there a way to change this setting on Linux?</p>
  
  <p>Thanks</p>