Connect to a VNC inside a docker which is on remote server Connect to a VNC inside a docker which is on remote server docker docker

Connect to a VNC inside a docker which is on remote server


Since you have already specified the firewall rules for your VNC server the problem is most likely in VNC port listening.

first, make sure that VNC is running on localhost run

nc localhost 5901

nc = netcat (you may need to install the package)change 5901 to your port no

you can also view the running VNC instances by :

vncserver -list

now if everything seems to be working run this command to show the port stats

sudo netstat -ntpl | grep 5901 

change 5901 to your portname.

if something like

127.0.0.1:5901 is assigned to tcp then that's the problem , we need to make sure VNC is running on

0.0.0.0:5901 

which means it should accept all the traffic and not just localhost !

finally kill the vncserver by running vncserver -kill :1 (display name), run the command :

vncserver -localhost no 

P.S its an old question but may help future answer seekers.