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 220.127.116.11 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=18.104.22.168 sport=49104 dport=80 src=22.214.171.124 dst=126.96.36.199 sport=
80 dport=49104 [ASSURED] mark=0 use=2 before I typed "GET /404".
But when I do big connection:
root@localhost:~# nc 188.8.131.52 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=184.108.40.206 sport=56991 dport=80 src=220.127.116.11 dst=18.104.22.168 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 22.214.171.124 80/
GET / from router, it works.
How to debug what is wrong?