![端口 27005 已关闭 - 我该如何强制打开它?](https://linux22.com/image/1047382/%E7%AB%AF%E5%8F%A3%2027005%20%E5%B7%B2%E5%85%B3%E9%97%AD%20-%20%E6%88%91%E8%AF%A5%E5%A6%82%E4%BD%95%E5%BC%BA%E5%88%B6%E6%89%93%E5%BC%80%E5%AE%83%EF%BC%9F.png)
我有一个 VPS(虚拟服务器),托管于卵巢癌。
我在 VPS 上运行 GMod;端口 27015 是服务器端口,并且处于打开状态。
但是,27005 不是。
IP 表是空白的,因为我刚刚刷新了它,它仍然处于关闭状态。27005 至关重要,因为它是查询端口。我如何为所有人解除 27005 的封锁?
我使用 Ubuntu 14.04 64 位。
root@vps#####:~# nmap localhost -p 27005-27020 --unprivileged
Starting Nmap 6.00 ( http://nmap.org ) at 2014-08-02 11:31 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00014s latency).
Other addresses for localhost (not scanned): 127.0.0.1
rDNS record for 127.0.0.1: localhost.localdomain
PORT STATE SERVICE
27005/tcp closed flexlm5
27006/tcp closed unknown
27007/tcp closed flexlm7
27008/tcp closed unknown
27009/tcp closed flexlm9
27010/tcp closed flexlm10
27011/tcp closed unknown
27012/tcp closed unknown
27013/tcp closed unknown
27014/tcp closed unknown
27015/tcp closed unknown
27016/tcp closed unknown
27017/tcp closed unknown
27018/tcp closed unknown
27019/tcp closed unknown
27020/tcp closed unknown
虽然它说:端口 27015 在 ##.##.###.### 上开放。
答案1
远程和本地nmap
探测器是什么样的?
$nmap localhost -p 27005-27020
Starting Nmap 6.40 ( http://nmap.org ) at 2014-08-01 16:59 CDT Nmap scan report for localhost (127.0.0.1) Host is up (0.00013s latency). Other addresses for localhost (not scanned): 127.0.1.1 PORT STATE SERVICE 27005/tcp closed flexlm5 27006/tcp closed unknown 27007/tcp closed flexlm7 27008/tcp closed unknown 27009/tcp closed flexlm9 27010/tcp closed flexlm10 27011/tcp closed unknown 27012/tcp closed unknown [...]
网络状态:netstat -aunt
输出?
例如,
$ netstat -aunt | grep 2700
tcp 0 0 0.0.0.0:27005 0.0.0.0:* LISTEN
网猫又名 nc
:使用类似的方法netcat
来测试您的系统和防火墙。
设置 netcat 监听端口 27005。
本地终端或进程:
$ nc -p 27005 -l
远程和本地访问测试:
$ telnet 本地主机 27005 尝试 127.0.0.1... 已连接到本地主机。 转义字符是‘^]’。 ^C^]
如果您被远程阻止而不是本地阻止,则这可能是防火墙问题。
刷新 IP 表真的能达到你想要的效果吗? 请参阅此帖子,例如,https://unix.stackexchange.com/questions/61957/does-iptables-f-permanently-delete-all-iptables-rules。
做此主题帮忙?(OVH 开放端口)
您是否尝试过 27015(此处引用,来自论坛主题)和 27005 的 iptables 条目?
iptables -A INPUT -p tcp --dport 27015 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp --dport 27015 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 27005 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp --dport 27005 -m state --state NEW,ESTABLISHED -j ACCEPT
另请参阅此主题关于端口转发。
如果这听起来像您遇到的问题,那么网络上有很多不错的端口转发指南(过去,Google 搜索中的热门结果已经奏效)。