我有一个在虚拟化的Debian 8.5(Windows 10下的VirtualBox)下运行的测试游戏服务器;这台Linux机器在网络中有自己的IP地址。 游戏服务器使用端口2106,7777和10241.我成功配置了我的盒子以使游戏服务器可以从WAN获得,这3个端口被重定向到Linux机器IP 192.168.1.70(测试来自我的Windows机器192.168.1.1)。 / p>
我在Windows上进行了一些telnet测试,例如:
telnet 192.168.1.70 2106 ==> Test OK
telnet 192.168.1.70 7777 ==> Test OK
telnet MY_PUBLIC_IP 2106 ==> Test OK
telnet MY_PUBLIC_IP 7777 ==> Test OK
telnet 192.168.1.70 10241 ==> Test KO !!
telnet MY_PUBLIC_IP 10241 ==> Test KO !!
与此同时,我从Linux机器上获取数据包并使用端口2106:
23:10:50.525372 IP 192.168.1.1.55598 > 192.168.1.70.2106: Flags [S], seq 2926133714, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
23:10:50.525398 IP 192.168.1.70.2106 > 192.168.1.1.55598: Flags [S.], seq 2509536992, ack 2926133715, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
23:10:50.525493 IP 192.168.1.1.55598 > 192.168.1.70.2106: Flags [.], ack 1, win 2053, length 0
23:10:50.526496 IP 192.168.1.70.2106 > 192.168.1.1.55598: Flags [P.], seq 1:187, ack 1, win 229, length 186
23:10:50.526555 IP 192.168.1.1.55598 > 192.168.1.70.2106: Flags [.], ack 187, win 2052, length 0
对于端口10241:
23:06:38.490407 IP 192.168.1.1.55536 > 192.168.1.70.10241: Flags [S], seq 1465108966, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
23:06:38.490431 IP 192.168.1.70.10241 > 192.168.1.1.55536: Flags [R.], seq 0, ack 1, win 0, length 0
23:06:38.990784 IP 192.168.1.1.55536 > 192.168.1.70.10241: Flags [S], seq 1465108966, win 8192, options [mss 1460,nop,nop,sackOK], length 0
23:06:38.990815 IP 192.168.1.70.10241 > 192.168.1.1.55536: Flags [R.], seq 0, ack 1, win 0, length 0
nmap -sT -O localhost
的结果:
Starting Nmap 6.47 ( http://nmap.org ) at 2017-02-17 23:12 CET
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000084s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 994 closed ports
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
111/tcp open rpcbind
2106/tcp open ekshell
3306/tcp open mysql
7777/tcp open cbt
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.15
Network Distance: 0 hops
netstat -tulpn(删除了无用的端口):
tcp 0 0 0.0.0.0:56069 0.0.0.0:* LISTEN 473/sshd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 883/mysqld
tcp6 0 0 :::9014 :::* LISTEN 3796/java
tcp6 0 0 :::2106 :::* LISTEN 3796/java
tcp6 0 0 :::7777 :::* LISTEN 3811/java
我没有配置到Linux机器的防火墙(这是一台测试机,而不是一台实时机器),只有默认的Debian IPtable。有人知道我可以做些什么来打开这个端口吗?
答案 0 :(得分:0)
根据你的netstat命令tcp 10241没有监听。 您可以尝试以下方法进行检查。
netstat -a|grep 10241
nc -u localhost 10241
这会给你一些指示。可能是在监听UDP端口。