Everyone knows the TCP port, for example, port 80, you can use telnet ip 80 to verify whether the port is listening normally, so can the UDP port be tested in the same way?
There are many articles on the Internet that test whether the UDP port is unblocked.None of them are accurateThe best test method is to enable a UDP listen on the server, and the client sends UDP packets to the server, and the server checks whether it can be received, as shown in the figure below:
nc is short for netcat, which uses UDP and TCP protocols. It is a reliable background operation tool that can be easily enabled by other programs, and it is also used as a testing tool or hacking tool for networks. With it, you can easily establish any connection. There are many useful tools built-in.
command
1) -l Used to specify that NC will be in listening mode. Specifying this parameter means that NC is treated as a server, listening for and accepting connections instead of initiating connections to other addresses. 2) -p <port> The user sets the port for listening 3) -s Specify the source IP address for sending data, which is applicable to multi-NIC machines 4) -u Specify that nc uses the UDP protocol, which defaults to TCP 5) -v Output interaction or error information, especially useful for novice debugging 6)-w The number of seconds of timeout, followed by the number 7)-z Indicates zero, which means that no data is sent when scanning
Test tutorial
serverEnable a UDP listener on port 12345 with the following command:
-lup is actually an abbreviation of -l -u -p
clientSend a message to the server using the UDP protocol with the following command:
Enter any string, enter it, and the server will check whether it has been received, as shown in the figure below:
Finally, attach the Windows nc tools below:
Tourists, if you want to see the hidden content of this post, please Reply
|