This article discusses the TCP TIME-WAIT state on Linux systems, explaining its purpose, potential problems, and various solutions to handle a large number of connections.
iptables -I INPUT -p tcp -m tcp --dport 5901 -m state --state NEW -j LOG --log-level 1 --log-prefix "New Connection "