Hardware A: Ubuntu 20.04 (192.168.1.61): Installed VNC server and added OpenVPN client config to some remote server C.
Hardware B: MacOS 11.1 (192.168.1.51): standart preinstalled VNC client.
From B to A i have perfect VNC connections when OpenVPN is disconnected. But when connect from A (as client) to OpenVPN server, VNC connection is immediately down. At the same time smb
, ping
(A <-> B) and traceroute
(A <-> B) works perfect and with same behaviour like with disconnected OpenVPN (down only VNC).
From B to A (with and without VPN):
% traceroute 192.168.1.61
traceroute to 192.168.1.61 (192.168.1.61), 64 hops max, 52 byte packets
1 192.168.1.61 (192.168.1.61) 27.855 ms 2.296 ms 35.563 ms
From A to B (with and without VPN):
$ traceroute 192.168.1.51
traceroute to 192.168.1.51 (192.168.1.51), 64 hops max, 52 byte packets
1 192.168.1.51 (192.168.1.51) 27.855 ms 2.296 ms 35.563 ms
Why VNC isn't work when OpenVPN client connected on VNC server and how to bypass this behaviour? I need connect VNC server to OpenVPN network and don't lost VNC connection in same time.
Option #1
Try
ssh
ing from B to A (in a terminal), and then using it as a tunnel to connect VNC. Steps:ssh -l <user name> -L 59000:localhost:5900 <server A>
. Orssh -L 59000:localhost:5900 <user name>@<server A>
Notes:<user name>
is only needed if not the same in the server and client. 59000 and 5900 can be changed.<server A>
can be named in~/.ssh/config
or used directly with ip.localhost:5900
.Sources:
Option #2
Get the IP of server A in the network and VNC to that IP.
Related
In my case i just switch ON this switch across OpenVPN Network in Settings -> Sharing -> Screen Sharing on vnc server OS. You need physical access to vnc server machine and connect OpenVPN first.
Now all works!