I send the file with cat file1 | nc ip-address port and receive it with nc -l port > file2 and get the file cut. The size of the received file is 28467200 bytes (approx. 28M) out of approx. 150M.
uname -a
Linux MyName 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
On other linux I have (Loki in VirtualBox inside Windows7) this limitation is not available.
uname -a
Linux Loki-VirtualBox 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I also used other software as a sending side with same result, therefore I blame the receiving part.
In Wireshark I see the (FIN, ACK) flag which makes the connection to close, but I cannot find any reason for it.
What could be a reason for such behavior?
EDIT: In case I use nc -l port > filename I receive 28M of data, but if I use nc -l port > filename < /dev/null, I receive 26K of data (took from this question: Sending file via netcat). Is this behavior somehow related?
stderrat each end, and see if there is anything in the error logs. Also, try the transfer with both sender and receiver on the local machine, using127.0.0.1as the sender IP. By the way, never usecat file | program ...- always use the much more efficientprogram <file .... – AFH Mar 14 '17 at 13:18stderrmessages. When you say that usinglocalhostmakes no difference, do you mean that the same error occurs? On both systems? Have you tried sending a similarly-sized file the other way? – AFH Mar 14 '17 at 16:12localhostI meant that the error happens only on the first PC no matter if the file is sent from outside or locally. It is always cut. The other PC has no such limitation no matter how I send the file there. – avp Mar 15 '17 at 08:52iptables -L -nis empty. How do I check what you mean? – avp Mar 16 '17 at 13:04scporrsyncalso display the behavior? (the main point being both programs support encrypting the data at the application level thus anything between the sender and receiver cannot see much other than encrypted data) – Hydranix Mar 17 '17 at 08:21