0

In the office we have an interesting situation: after there is a connection (even if it's just a web page refresh) from any computer to our test server (hosted on AWS), another computer wouldn't be able connect anymore for some time (about 30 seconds).

First computer would still be able to connect, and all the already open connections from the second one would still work (like SSH).

This is only happening when both computers are on the same network / external ip address. For example, if second computer would use VPN - it would be able to connect.

Obviously, this is far from optimal.

I'm trying to find out what's wrong. Iptables rule table is completely empty, except for one rule, that I've added to log incoming connections to SSH (for the debugging purposes):

iptables -I INPUT -p tcp --dport 22 --syn -j LOG --log-prefix "22 SSH: "

That shows that, while second computer is not able to connect to SSH, packets are still reaching the server (and being logged by iptables with the data like: "LEN=48 TOS=0x00 PREC=0x00 TTL=49 ID=18889 DF PROTO=TCP SPT=54750 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0").

What else can I check to try to find the reason for this strange behaviour?

1
  • Are you using ufw? check ufw status
    – meuh
    Jul 17, 2017 at 17:52

1 Answer 1

1

Found it. sysctl tcp_tw_recycle was set to 1. Which, apparently, known to cause problems with clients behind NAT (Reference: https://stackoverflow.com/questions/8893888/dropping-of-connections-with-tcp-tw-recycle )

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .