Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 11097  / 1 Year ago, fri, december 23, 2022, 5:12:06

I installed TigerVNC server on my Ubuntu server but I can't connect to it. The server is running but when I try to scan for open ports (in LAN) using my phone, 5901 is closed.


Output of nmap localhost:


Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-25 08:02 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00026s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
631/tcp open ipp
5901/tcp open vnc-1

Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds

I think the problem is here.
Output of nmap 192.168.0.101:


Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-25 08:05 UTC
Nmap scan report for cloud.local (192.168.0.101)
Host is up (0.00039s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.58 seconds

What I've already tried:



  • Allow port 5901/tcp in firewall

  • Disable firewall and reboot


EDIT:
Output of nmap 192.168.0.101 -p 5900-5901:


Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-25 09:50 UTC
Nmap scan report for cloud.local (192.168.0.101)
Host is up (0.00032s latency).

PORT STATE SERVICE
5900/tcp closed vnc
5901/tcp closed vnc-1

Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds

More From » 20.04

 Answers
3

I asked another question and this is specific to TigerVNC Server.


From https://askubuntu.com/a/1254109/1027810 :



TigerVNC by default listens only on the loopback network interface.
This is good for security, so that only you on the very same computer can connect.


Of course, if you want to connect remotely, you need to specifically specify it as follows:



  1. When you start the server from the command line, add -localhost no to the command line.


    tigervncserver -localhost no :1



  2. Configure TigerVNC to permanently listen to all network interfaces in /etc/vnc.conf. Add the following. Note that the configuration file gives the impression that no is the default. They do not follow the convention that if a configuration is commented out in the config file, it should have the default value (and not the other value you would normally change to).


    $localhost = "no";





[#3122] Saturday, December 24, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inaterested

Total Points: 500
Total Questions: 104
Total Answers: 92

Location: Virgin Islands (U.S.)
Member since Fri, May 7, 2021
3 Years ago
inaterested questions
Fri, Aug 12, 22, 21:24, 2 Years ago
Wed, Apr 27, 22, 17:14, 2 Years ago
Tue, Oct 26, 21, 20:41, 3 Years ago
;