Problem

Console connections traversing network (in particular a firewall) are silently dropped. Emulator is never notified that the connection has been dropped and refuses new connections to the console.

Firewalls keep information about active connections in tables of finite length. Many firewalls will throw away table entries for inactive connections. What a firewall considers "inactive" is dependent on the firewall product and configuration.

Solution

The problem can be solved by changing the firewall configuration to be more generous to such console connections, or to use TCP keepalive packets. This article describes the latter.

TCP keepalive is a TCP option that causes packets to be exchanged over a connection even if there is no traffic to transport. It should be enabled on both ends of the connection. TCP keepalive must be enabled at the operating-system level *and* by the application/program opening TCP connections.

Linux

On Linux, edit the "/etc/sysctl.conf" file and add these lines:

net.ipv4.tcp_keepalive_time = 200

net.ipv4.tcp_keepalive_probes = 9

net.ipv4.tcp_keepalive_intvl = 50

(feel free to adapt the values as you see fit). When done editing, you must make the new values known to the kernel:

# sysctl --load=/etc/sysctl.conf

Windows

On Windows, the defaults are too large. The default values can be overridden by creating new keys in the windows registry.  Please see this link for instructions:
http://www.charlescrampton.com/2011/10/tcp-keep-alive-in-windows-vista-and.html

Here is the relevant bit:


Reboot when finished.

PuTTY

You must also enable TCP keepalive packets in PuTTY. To do this:

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.