Windows NC tests whether the UDP port is connected

background

The best way to check whether the udp port of the server is open is to enable a UDP monitor on the server, and the client sends a UDP packet to the server, and the server checks to see if it can receive it.

example

Link: https://eternallybored.org/misc/netcat/
Unzip netcat on window and configure environment variables:

image-20221202111453707

image-20221202111539709

Install the nc command on the server side and listen to a udp port,

yum install nc -y

img

Then send a udp packet from the port to the server on the client

img

Send data on the client, you can see that the server can receive it, indicating that the udp port from the client to the server is open.

img

nc command

-l
# 用于指定nc将处于侦听模式。指定该参数,则意味着nc被当作server,侦听并接受连接,而非向其它地址发起连接。
-p <port>
# 用户设置监听的端口
-s
# 指定发送数据的源IP地址,适用于多网卡机
-u
# 指定nc使用UDP协议,默认为TCP
-v
# 输出交互或出错信息,新手调试时尤为有用
-w
# 超时秒数,后面跟数字
-z
# 表示zero,表示扫描时不发送任何数据

Guess you like

Origin blog.csdn.net/weixin_44021220/article/details/129585678