Warning, got duplicate tcp line – netstat error and solution

Q. Whenever I run netstat command it bumps be back with an error, which read as follows:
tcp 0 0 ip-201-19-xxx-xxx.ip.s:http adsl-71-129-54-230.dsl:2249 TIME_WAIT
tcp 0 0 ip-201-19-xxx-xxx.ip.s:http ca-dstreet-cuda3-c6a-5:4380 TIME_WAIT
tcp 0 0 ip-201-19-xxx-xxx.ip.s:http ip72-199-249-17.sd.sd.:1845 TIME_WAIT
tcp 0 0 ip-201-19-xxx-xxx.ip.s:http cache-mtc-ad10.proxy.:59985 TIME_WAIT
warning, got duplicate tcp line
warning, got duplicate tcp line

Although, everything is working fine but I am little worried about this error. How do I fix this error and what does it mean?

A. This is quite uncommon. This error indicating that client/server connection are rapidly closing and reconnecting to ip ip-201-19-xxx-xxx.ip on same port 80.

To fix this problem, open /etc/sysctl.conf and

# vi /etc/sysctl.conf

Append or modify text as follows:

net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_tw_recycle = 0

Save the file and reboot the system. If particular client IP addresses causing this problem, use the iptables to drop the client IP or block IP with null routes.


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • dave Mar 29, 2007 @ 8:23

    # Append or modify text as follows:

    # net.ipv4.tcp_tw_reuse = 0
    # net.ipv4.tcp_tw_recycle = 0

    I did like you said, but “warning, got duplicate tcp line” still happens. What does it mean actually. Where I can find more info about the matter?

  • Gagan Brahmi Jan 13, 2009 @ 14:00

    Nope.. This does not work…

  • Mac Jul 26, 2013 @ 21:43

    How do you remove user with smbpasswd command, I have been searching not able to find it any help/advice would be great.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum