使用nc检测udp端口是否可以正常通讯
2012-09-17 19:55
766 查看
netcat,很少用,总把这东西忘了,做个记录,这玩意也有windows版的http://joncraton.org/blog/46。
[root@domU-12-33-39-01-6C-F1:~] nc -h
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
[-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port[s]]
Command Summary:
-4 Use
IPv4
-6 Use
IPv6
-D Enable
the debug socket option
-d Detach
from stdin
-h This
help text
-i secs Delay
interval for lines sent, ports scanned
-k Keep
inbound sockets open for multiple connects
-l Listen
mode, for inbound connects
-n Suppress
name/port resolutions
-p port Specify
local port for remote connects
-r Randomize
remote ports
-s addr Local
source address
-T ToS Set
IP Type of Service
-C Send
CRLF as line-ending
-t Answer
TELNET negotiation
-U Use
UNIX domain socket
-u UDP
mode
-v Verbose
-w secs Timeout
for connects and final net reads
-X proto Proxy
protocol: "4", "5" (SOCKS) or "connect"
-x addr[:port] Specify
proxy address and port
-z Zero-I/O
mode [used for scanning]
Port numbers can be individual or ranges: lo-hi [inclusive]
用来测试upd端口是否正常
a端:nc -ul 161
b端: nc -u a.a.a.a 161
在b端随便输入字符,看是否能够传到a端。
通过测试,使用nc传文件要比scp快不少,当然,安全性低了。
a端:nc -l 161 >/opt/test
b端:nc a.a.a.a 161 <test
不要使用udp协议啊,UDP不保证传输的可靠性
[root@domU-12-33-39-01-6C-F1:~] nc -h
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
[-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port[s]]
Command Summary:
-4 Use
IPv4
-6 Use
IPv6
-D Enable
the debug socket option
-d Detach
from stdin
-h This
help text
-i secs Delay
interval for lines sent, ports scanned
-k Keep
inbound sockets open for multiple connects
-l Listen
mode, for inbound connects
-n Suppress
name/port resolutions
-p port Specify
local port for remote connects
-r Randomize
remote ports
-s addr Local
source address
-T ToS Set
IP Type of Service
-C Send
CRLF as line-ending
-t Answer
TELNET negotiation
-U Use
UNIX domain socket
-u UDP
mode
-v Verbose
-w secs Timeout
for connects and final net reads
-X proto Proxy
protocol: "4", "5" (SOCKS) or "connect"
-x addr[:port] Specify
proxy address and port
-z Zero-I/O
mode [used for scanning]
Port numbers can be individual or ranges: lo-hi [inclusive]
用来测试upd端口是否正常
a端:nc -ul 161
b端: nc -u a.a.a.a 161
在b端随便输入字符,看是否能够传到a端。
通过测试,使用nc传文件要比scp快不少,当然,安全性低了。
a端:nc -l 161 >/opt/test
b端:nc a.a.a.a 161 <test
不要使用udp协议啊,UDP不保证传输的可靠性
相关文章推荐
- 使用nc检测udp端口是否可以正常通讯
- 使用nc检测udp端口是否可以正常通讯
- 使用nc检测udp端口是否可以正常通讯 【转】
- keepalived使用nc命令检测udp端口
- nc检测端口是否正常服务的一个命令
- Linux系统下怎样利用nc命令来监控检测服务器的端口使用情况
- python检测远程udp端口是否打开的方法
- 利用telnet命令检测远程主机端口是否正常开放
- Linux下利用nc命令来监控检测服务器的端口使用情况
- java检测本机端口是否已经被使用的代码
- 批量检测服务器是否可以使用ssh登陆
- (转) Linux下利用nc命令来监控检测服务器的端口使用情况
- linux下自动检测服务端口是否正常监听。
- 【SSB】使用命令行来检测Broker是否正常通信
- asp.net发送给udp端口,发送数据包,服务端为windows服务侦听.可以不使用Remoting
- TCP和UDP是否可以绑定同一端口进行通信
- Linux使用nc命令监控检测服务器端口
- 即时通讯检测网络是否正常
- 检测 一个网站URL是否可以正常访问
- WyBox使用shell脚本检测io口是否正常