Sometimes from Linux system I see the following weird behaviour:
I able to ping things and sometimes use some services, but networking is very bad.
For example, now I routed connection through my laptop (
-j MASQUERADE) and observing the following thing: If I do little TCP connection (server sends few data to me), it proceeds:
# nc 126.96.36.199 80 GET /404 <html> <head><title>404 Not Found</title></head> <body bgcolor="white"> <center><h1>404 Not Found</h1></center> <hr><center>nginx</center> </body> </html>
tcp 6 431998 ESTABLISHED src=192.168.99.9 dst=188.8.131.52 sport=49104 dport=80 src=184.108.40.206 dst=220.127.116.11 sport=
80 dport=49104 [ASSURED] mark=0 use=2 before I typed "GET /404".
But when I do big connection:
root@localhost:~# nc 18.104.22.168 80 GET /
It stalls. Before I enter "GET /" it shows ESTABLISHED ASSURED, as usual, but after I press Return it goes to
tcp 6 0 CLOSE_WAIT src=192.168.99.9 dst=22.214.171.124 sport=56991 dport=80 src=126.96.36.199 dst=188.8.131.52 sport=80 dpo
rt=56991 [ASSURED] mark=0 use=2. No packet with is received. When I finally press Ctrl+C, it sends FIN to server, and Wireshard complains that server's FIN is "Out-of-order". Like if the reply packed dropped somewhere.
When I do the same
nc 184.108.40.206 80/
GET / from router, it works.
How to debug what is wrong?