4

I am using Ubuntu 18.04 LTS. I performed an apt get tigervnc-standalone-server adn tigervnc-common. I am using an xstartup from another host that is running the same setup. When I attempt to connect to the box with the tigervnc client, I get a connection refused 61 message. If go directly on the box and attempt to vncviewer 10.207.0.201:5901 I also get a connection refused message, BUT if I do a vncviewer 127.0.0.1:5901, I can connect. Here is some back ground information.

richmaes@portal01:~$ nmap localhost

Starting Nmap 7.60 ( https://nmap.org ) at 2019-02-07 17:33 PST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000040s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
631/tcp  open  ipp
5901/tcp open  vnc-1

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

AND then interestingly enough (my eyes pop out of my head) because 5901 is there if I use the home address but not if I use its static address.

richmaes@portal01:~$ nmap 10.207.0.102

Starting Nmap 7.60 ( https://nmap.org ) at 2019-02-07 17:42 PST
Nmap scan report for portal01 (10.207.0.102)
Host is up (0.000051s latency).
Not shown: 997 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

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

And I confirm that I am really know what my local IP is.

richmaes@portal01:~$ ifconfig -a
 enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
 inet 10.207.0.102  netmask 255.255.255.0  broadcast 10.207.0.255
        inet6 fe80::56bf:64ff:fe63:43d0  prefixlen 64  scopeid 0x20<link>
        ether 54:bf:64:63:43:d0  txqueuelen 1000  (Ethernet)
        RX packets 4295  bytes 3015163 (3.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1526  bytes 150636 (150.6 KB) 
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xef180000-ef1a0000  

vncserver is listening on port 5901 according to nmap relative to home address only. I have checked that there are not rules in iptables or ufw. What is happening here?

richmaes@portal01:~$ sudo iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

And the Firewall

richmaes@portal01:~$ sudo ufw status verbose
Status: inactive
Rich Maes
  • 245

2 Answers2

4

Douugh!

the configuration file /etc/vnc.conf needed a

$localhost = "no";

ckapilla
  • 103
Rich Maes
  • 245
3

You can also set it on the command line:

vncserver ... -localhost no
Worthwelle
  • 4,816