bak*_*ytn 11 firewall services
我有一个 Quake 3 服务器。并成功启动。
问题是没有人可以连接到该服务器。
我正在跑步:nmap -sU -p 27960 hostname
它向我展示了它的状态open|filtered
如果我直接从服务器运行该命令,它是open
.
另外,我确保它具有约束力 iface
我检查了iptables规则,但找不到任何与之相关的过滤器。此外,我试图通过显式打开端口iptables -A INPUT -p udp --dport 27960 -j ACCEPT
但这没有帮助。
它可能是什么?
我打电话给 ISP 支持中心,他们说他们没有过滤任何东西。
pra*_*tri 15
从本地机器和远程机器获得不同的 nmap 结果意味着有某种防火墙(无论是本地运行还是某些远程机器)正在阻止。根据 nmap 文档,
open|filtered
Nmap places ports in this state when it is unable to determine whether
a port is open or filtered. This occurs for scan types in which open
ports give no response. The lack of response could also mean that a
packet filter dropped the probe or any response it elicited. So Nmap
does not know for sure whether the port is open or being filtered. The
UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way.
Run Code Online (Sandbox Code Playgroud)
我建议您尝试使用以下工具来确定问题是否确实存在:
port 27960
使用tcpdump
和的 UDP 数据包。检查数据包是否到达您的机器。运行以下命令,将发往27960端口的udp包抓到文件中 tcpdump.out
$ sudo tcpdump -A 'udp and port 27960' -w tcpdump.out`
Run Code Online (Sandbox Code Playgroud)
尝试使用从其他机器连接到端口 netcat
$ nc <server-ip-address> -u 27960
Run Code Online (Sandbox Code Playgroud)
现在停止转储并检查是否在 tcpdump.out 中捕获了任何数据包或不使用wireshark。
$ wireshark tcpdump.out
Run Code Online (Sandbox Code Playgroud)
如果没有捕获到数据包,这意味着某些中间设备(防火墙)正在阻止通信。否则,如果被捕获,请检查服务器作为请求的回报而给出的答复。如果是任何类型的带有错误代码的 ICMP 回复,则表示有一些本地防火墙正在阻止。