On 2/16/20 2:53 AM, Patrick Dupre wrote:
Two ways, From euripide (the "remote", ie: the server)
nmap
nmap -v -n -Pn -p5900-5906 euripide
Starting Nmap 7.70 ( https://nmap.org ) at 2020-02-16 11:46 CET Initiating Connect Scan at 11:46 Scanning euripide (193.52.235.60) [7 ports] Discovered open port 5901/tcp on 193.52.235.60 Completed Connect Scan at 11:46, 0.00s elapsed (7 total ports) Nmap scan report for euripide (193.52.235.60) Host is up (0.00037s latency). Other addresses for euripide (not scanned): fe80::de89:7b2c:9cf1:d1c9
PORT STATE SERVICE 5900/tcp closed vnc 5901/tcp open vnc-1 5902/tcp closed vnc-2 5903/tcp closed vnc-3 5904/tcp closed unknown 5905/tcp closed unknown 5906/tcp closed unknown
If you run this on the server, it's the same system. Even if you specify an IP address, the connection is still going to go over localhost. So this is the same result you had before.
lsof -p $(pidof Xvnc) | grep LISTENXvnc 5308 pdupre 6u IPv4 145831 0t0 TCP *:5901 (LISTEN) Xvnc 5308 pdupre 7u IPv6 145832 0t0 TCP *:5901 (LISTEN)
That is useful. That tells you that it's listening on all interfaces, so you still only need to adjust the firewall to let connections through to that port.