参数不多,应该没有用错,是这样的
服务端运行iperf -u -s
我端运行iperf -u -c vps
运行后服务端无任何反应,
客户端提示WARNING: did not receive ack of last datagram after 10 tries.
不加-u参数测试tcp时倒是有反应,用-p参数换其他端口也是没有反应,问问大家有可能是什么原因呢。
1
wy315700 2015-06-24 21:23:21 +08:00
防火墙?
|
5
ryd994 2015-06-24 21:30:21 +08:00
“-p参数换其他端口也是没有反应”
这就是很典型的防火墙的症状 iptables-save看看 |
6
whoops OP root@default:~# iptables-save
# Generated by iptables-save v1.4.21 on Wed Jun 24 09:32:29 2015 *raw :PREROUTING ACCEPT [2468563:1371088640] :OUTPUT ACCEPT [990233:1187432121] COMMIT # Completed on Wed Jun 24 09:32:29 2015 # Generated by iptables-save v1.4.21 on Wed Jun 24 09:32:29 2015 *nat :PREROUTING ACCEPT [12904:1023439] :POSTROUTING ACCEPT [2342:145310] :OUTPUT ACCEPT [2342:145310] -A POSTROUTING -s 192.168.0.0/16 -j MASQUERADE COMMIT # Completed on Wed Jun 24 09:32:29 2015 # Generated by iptables-save v1.4.21 on Wed Jun 24 09:32:29 2015 *mangle :PREROUTING ACCEPT [2468563:1371088640] :INPUT ACCEPT [1027336:359640181] :FORWARD ACCEPT [1441225:1011445635] :OUTPUT ACCEPT [990233:1187432121] :POSTROUTING ACCEPT [2431458:2198877756] COMMIT # Completed on Wed Jun 24 09:32:29 2015 # Generated by iptables-save v1.4.21 on Wed Jun 24 09:32:29 2015 *filter :INPUT ACCEPT [1027336:359640181] :FORWARD ACCEPT [1441225:1011445635] :OUTPUT ACCEPT [990233:1187432121] COMMIT # Completed on Wed Jun 24 09:32:29 2015 root@default:~# |
8
can 2015-06-25 09:56:03 +08:00
iptables -L
#看看VPS打开了哪些端口 iptables -I INPUT -i eth0 -p udp --dport 5001 -j ACCEPT iptables -I OUTPUT -o eth0 -p udp --sport 5001 -j ACCEPT #打开UDP 5001端口(iperf默认端口) iptables save #保存或 service iptables restart lsof -i:5001 #查看5001是否开放,显示说明已经打开,反之则没开 |