我有一个在盒子上运行的 VNC 服务器,但无法通过互联网连接到它,我不知道为什么。这是我所拥有的:
在服务器上
$ ps ax | grep Xvnc
21304 ? S 0:00 Xvnc4 :1 -desktop semios-Aspire-V5-571:1 (anthony) -auth /home/anthony/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/anthony/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
24999 pts/13 S+ 0:00 grep --color=auto Xvnc
在客户端上(尝试连接 VNC 查看器时使用wireshark捕获)
21 7.322833000 192.168.1.121 XX.XX.XX.XX TCP 74 56367 > 5901 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=75810697 TSecr=0 WS=128
38 8.318986000 192.168.1.121 XX.XX.XX.XX TCP 74 [TCP Retransmission] 56367 > 5901 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=75810947 TSecr=0 WS=128
138 10.322993000 192.168.1.121 XX.XX.XX.XX TCP 74 [TCP Retransmission] 56367 > 5901 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=75811448 TSecr=0 WS=128
201 14.330997000 192.168.1.121 XX.XX.XX.XX TCP 74 [TCP Retransmission] 56367 > 5901 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=75812450 TSecr=0 WS=128
然后我收到一条消息“与主机 semios::5901 的连接已关闭。“但是在路由器上,端口 5900 - 5910 被转发到相应的主机。我还缺少什么?
编辑1
$ gvncviewer 127.0.0.1:5901&
[1] 28606
ron@semios-Aspire-V5-571:~$
** (gvncviewer:28606): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-lIUigxICjd: Connection refused
Failed to connect to server