I don't understand the behaviour of netcat. Let's say that I have one host acting as server:[root@localhost tmp]# nc -u -l -p 670Then I try to connect from a client:root@debian:/tmp#  nc   -u   192.168.0.109 670Meanwhile I try to capture those packages:[root@localhost sergio]# tcpdump -nn -i wlp7s0 port 670I see no packets at all, only when I issue something like:root@debian:/tmp#  echo Hola Mundo | nc   -u   192.168.0.109 670[root@localhost sergio]# tcpdump -nn -i wlp7s0 port 670tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on wlp7s0, link-type EN10MB (Ethernet), capture size 65535 bytes01:37:39.425276 IP 192.168.0.114.44287 > 192.168.0.109.670: UDP, length 12I wonder if is it the proper behaviour of netcat. Why is the reason why it's not seen any packets except when I send something from stdin?
tcpdump and nc with udp
tcpdump;udp;netcat
Because you are using UDP.There is no connection setup in UDP before sending any packets like you have with TCP, which means you only see packets if actual data gets transferred. And netcat sends only the data  it gets from stdin.