LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.07k stars 481 forks source link

Support IPv6 for reverse VNC connections to a listening VNC client/viewer #597

Closed rdiez closed 8 months ago

rdiez commented 8 months ago

I am using Remmina in listening VNC mode in order to accept reverse VNC connections. That functionality implemented in a plug-in called VNCI (VNC listener Plugin), which is included with Remmina.

IPv4 is working fine, but IPv6 isn't. I checked the listening sockets with this command:

$ sudo ss --listening --processes | grep 5500

tcp   LISTEN 0   5   0.0.0.0:5500  0.0.0.0:*  users:(("remmina",pid=2182972,fd=96))

I am no IPv6 expert, but it does not seem to be listening on IPv6.

I heard that Remmina does not implement the VNC protocol itself, but it uses libvncserver.

Does this library support listening on IPv6 for reverse VNC connections?

bk138 commented 8 months ago

Yes, it does since 75bfb1f5d396b2908a9615cd02bebfc952baa045.

bk138 commented 8 months ago

Also, just tried with MultiVNC. sudo ss --listening --processes | grep 5500 gives me

tcp   LISTEN 0      5                                                   0.0.0.0:5500                       0.0.0.0:*    users:(("multivnc",pid=1009870,fd=12))                                                        
tcp   LISTEN 0      5                                                      [::]:5500                          [::]:*    users:(("multivnc",pid=1009870,fd=13))   

So I reckon it's working :-).

rdiez commented 8 months ago

Many thanks for the quick, accurate information.

Do you have any idea why this may not be working on my system? For example, does the library user (the Remmina plug-in) have to specify some flag?

I just checked again, and I realised that I do not have global IPv6 connectivity. Does the library or the system detect that, and does not listen on link-local addresses starting with fe80? I was just testing VNC on the same system (localhost).

The trouble is, I don't know much about IPv6 yet. I thought that, because I only have one interface, the fe80::xxxx address would be unique and would work, but ping does not work unless I specify the %interface suffix. So maybe normal listeners would not normally work either.

bk138 commented 8 months ago

No problem! I suggest you read the relevant-for-you parts of https://tldp.org/HOWTO/Linux+IPv6-HOWTO/ - it has all the IPv6 info.

I just tried with Remmina myself and it seems it only listens on IPv4, so it's probably not your system.

rdiez commented 8 months ago

No problem! I suggest you read the relevant-for-you parts of https://tldp.org/HOWTO/Linux+IPv6-HOWTO/ - it has all the IPv6 info.

8-O

I just tried with Remmina myself and it seems it only listens on IPv4, so it's probably not your system.

Many thanks again for your help. I'll get in touch with the Remmina people about this.