EDIT:
I found PC3 had Settings -> Sharing -> Screen Sharing -> Networks -> <Current SSID> enabled, and PC1 had it disabled.
Enabling it in PC1 was perhaps needed and I did it, but that didn't solve the problem.

I am VNCing,
Server PC1: Ubuntu 20.04.3LTS sudo apt upgrade
d to 20.04.5LTS, with vino-server
.
Client PC2: Win 10 PC2, with tigervnc.
I can VNC PC2 -> PC1 when PC1 is connected to the router via LAN.
I cannot VNC PC2 -> PC1 when PC1 is connected to the router via WiFi (the error message is "unable to connect to socket: Connection timed out (10060)") even when LAN is disconnected and PC1 rebooted (see this). I can surf the web from PC1 (after work described below).
I have another PC3 with Ubuntu 20.04.5LTS, connected only via WiFi.
I can VNC PC2 -> PC3.
I don't know what potential differences between PC1 and PC3 to check.
How can I diagnose and solve this?
Notes:
I was able to VNC to PC1 via WiFi until recently. Things that possibly changed:
1.1. My ISP seems to have updated the router firmware, as its home page changed slightly. I cannot tell if anything else changed. I pressed the reset button of the router, and reinstated my WiFi SSID/password.
1.2. I was not able to connect from PC1 to the internet (I don't know if prior to resetting the router I could). Adding nameserver 8.8.8.8
to /etc/resolv.conf
(it only had nameserver 127.0.0.53
) solved the issue. I then set /etc/resolv.conf
as a symlink to a custom file, instead of the default, to avoid it being rewritten. I wouldn't know why all these changes (or perhaps only one of them) required customization of /etc/resolv.conf
. After upgrading to 20.04.5LTS this is still needed.
In PC3 /etc/resolv.conf
only has nameserver 127.0.0.53
, and I can both connect from PC3 to the internet, and VNC from PC2 to PC3. Also puzzling.
Related:
- Ubuntu Server 17.04 reachable via LAN, but not via WAN interface (but not about VNC).