I want to set up a VNC connection between my computer and my mobile phone.
I created a Wi-Fi hotspot on the computer and I connected my phone to this Wi-Fi network.
I set up a VNC server on the computer, using
I checked and it is running:
_$ sudo systemctl status email@example.com ● firstname.lastname@example.org - Remote desktop service (VNC) Loaded: loaded (/etc/systemd/system/vncserver@.service; enabled; vendor prese Active: active (running) since Wed 2019-08-07 18:27:15 CEST; 2h 41min ago Main PID: 10463 (vncserver) Tasks: 0 (limit: 4915) Memory: 904.0K CGroup: /email@example.com ‣ 10463 /usr/bin/perl /usr/bin/vncserver :1 -geometry 1440x900 -alway_
I also checked port 5901:
_$ nmap localhost Starting Nmap 7.70 ( https://nmap.org ) at 2019-08-07 18:43 CEST Nmap scan report for localhost (127.0.0.1) Host is up (0.00049s latency). Not shown: 998 closed ports PORT STATE SERVICE 631/tcp open ipp 5901/tcp open vnc-1_
On the mobile phone I installed a VNC client. I did not set up ssh.
I tried to connect it to the server with the address
But to no avail; I see this message:
"The port on which the computer is listening for a connection could not be contacted."
I have no idea why I can't connect. The Ubuntu server does not run a firewall.
This is the outcome of "sudo iptables-save"
$ sudo iptables-save # Generated by iptables-save v1.6.1 on Wed Aug 7 22:52:46 2019 *filter :INPUT ACCEPT [6569:5209874] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [5441:510108] -A INPUT -i wlp3s0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i wlp3s0 -p tcp -m tcp --dport 67 -j ACCEPT -A INPUT -i wlp3s0 -p udp -m udp --dport 53 -j ACCEPT -A INPUT -i wlp3s0 -p tcp -m tcp --dport 53 -j ACCEPT -A FORWARD -d 10.42.0.0/24 -o wlp3s0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 10.42.0.0/24 -i wlp3s0 -j ACCEPT -A FORWARD -i wlp3s0 -o wlp3s0 -j ACCEPT -A FORWARD -o wlp3s0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i wlp3s0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Aug 7 22:52:46 2019 # Generated by iptables-save v1.6.1 on Wed Aug 7 22:52:46 2019 *nat :PREROUTING ACCEPT [215:28223] :INPUT ACCEPT [160:24399] :OUTPUT ACCEPT [677:49578] :POSTROUTING ACCEPT [643:47493] -A POSTROUTING -s 10.42.0.0/24 ! -d 10.42.0.0/24 -j MASQUERADE COMMIT # Completed on Wed Aug 7 22:52:46 2019