F.2. nc

Quick example of nc (pronounced net-cat) in action.

Example F.1. Simple use of nc

[root@tristan]# nc 25
220 isolde ESMTP
221 isolde

nc is one of a large number of tools for making a simple TCP connection.

Example F.2. Specifying timeout with nc

[root@tristan]# nc -w 5 22

Example F.3. Specifying source address with nc

[root@masq-gw]# nc -s 25

Example F.4. Using nc as a server

[root@tristan]# nc -l -p 2048

Example F.5. Delaying a stream with nc

[root@tristan]# nc -l -p 2048

Example F.6. Using nc with UDP

[root@tristan]# nc -u 3000