1. Install netcat on kvm3:
2. Start netcat as a server, listening on port UDP/8080
3. When the session is over, type Ctrl-C to stop the netcat server.
4. Start the server on TCP/8080 to write into a file, outputfile.txt :
netcat -l 8080 > outputfile.txt
5. After the file is received, the connection closes itself.
Check the content of the file:
1. Install netcat on CentOS7:
2. By using ncat, connect to UDP/8080 port on kvm3,
ncat 192.168.122.118 -u 8080
3. Start typing text. Hit ENTER key. The text should appear on the both terminals.
Press Ctrl+D to close the UDP connection.
4. Send file /etc/hosts to TCP/8080 on kvm3 VM via netcat:
ncat 192.168.122.118 8080 < /etc/hosts