1

I have until now been running on Ubuntu servers 20.04 and lower, where I have used headless server settings, with SSH access, with specific ports for each server for terminal commands, and VNC with specific ports for remote desktop. I have used dconf-editor to make the listening ports for VNC. The ports are of course open in the firewall. The router is set up with port-forwarding to the different IP addresses. We are using TightVNC for windows clients.

Now I have installed a new Dell EMC server with Ubuntu 22.04 LTS server, and it looks like I cannot use the dconf-editor to open the listening ports for VNC-server, at least I cant find the port under org>gnome>desktop>remote-access after installing dconf-editor.

Updated after answer from @harrymc

I have tried following without being able to change the listening port:

gconftool-2 --set --type=bool /desktop/gnome/remote_access/use_alternative_port true
gconftool-2 --set --type=int /desktop/gnome/remote_access/alternative_port 5555

xxx@xxxxx-srv05:~$ sudo lsof -i -P -n | grep LISTEN
[sudo] password for xxx:
systemd-r  858 systemd-resolve   14u  IPv4  26808      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd      1187            root    3u  IPv4  27294      0t0  TCP *:229 (LISTEN)
sshd      1187            root    4u  IPv6  27296      0t0  TCP *:229 (LISTEN)
smbd      1211            root   44u  IPv6  27408      0t0  TCP *:445 (LISTEN)
smbd      1211            root   45u  IPv6  27409      0t0  TCP *:139 (LISTEN)
smbd      1211            root   46u  IPv4  27410      0t0  TCP *:445 (LISTEN)
smbd      1211            root   47u  IPv4  27411      0t0  TCP *:139 (LISTEN)
gnome-rem 1308            xxx    13u  IPv6  29259      0t0  TCP *:3389 (LISTEN)
gnome-rem 1308            xxx    15u  IPv6  29261      0t0  TCP *:5900 (LISTEN)

I have tried several VNC servers with complete reinstallation, for avoiding conflicts, but right now I have installed xfce4 with TightVNC Server.

When I am finding instructions about this on the internet, the instructions are typically configured with SSH post 22 on a LAN, but not with port-forwardings to several machines and servers like I and many others prefer.

I am using port-forwarding to my SSH servers also.

What am I doing/thinking wrong here?

2
  • Which VNC server?
    – harrymc
    Commented May 19, 2022 at 8:41
  • I have tried several with complete reinstallation, for avoiding conflicts, but right now I have installed xfce4 with TightVnc Server. When I am finding instructions about this on the internet, the instructions are typically configured with SSH post 22 on a LAN, but not with port-forwardings to several machines and servers like I and many others prefer. I am using port-forwarding to my SSH servers also. Commented May 21, 2022 at 4:38

2 Answers 2

0

The 'use_alternative_port' key might be set to false in your case,

For example, to enable it and set port 5555, use the command line :

gconftool-2 --set --type=bool /desktop/gnome/remote_access/use_alternative_port true
gconftool-2 --set --type=int /desktop/gnome/remote_access/alternative_port 5555

The port should be in the range of 5000 - 50000.

10
  • Thank you, I tried this earlier also, but unfortunately, the listening port was not changed. xxx@xxx-srv05:~/Documents/sdc1$ sudo lsof -i -P -n | grep LISTEN [sudo] password for lasse: systemd-r 812 systemd-resolve 14u IPv4 25518 0t0 TCP 127.0.0.53:53 (LISTEN) sshd 1170 root 3u IPv4 29066 0t0 TCP *:228 (LISTEN) sshd 1170 root 4u IPv6 29068 0t0 TCP *:228 (LISTEN) gnome-rem 1285 xxx 13u IPv6 28640 0t0 TCP *:3389 (LISTEN) gnome-rem 1285 xxx 15u IPv6 28642 0t0 TCP *:5900 (LISTEN) Commented May 21, 2022 at 4:21
  • You should Edit your post with this information. It's hard to read in a comment.
    – harrymc
    Commented May 21, 2022 at 7:15
  • Ok, thanks, done. Commented May 21, 2022 at 7:34
  • Something I don't understand : If you're using port-forwarding on the router, why do you need to change the ports in the computer?
    – harrymc
    Commented May 21, 2022 at 7:37
  • A listening port and port forwarding is the "handshake" between the router and the application on a computer with a static LAN IP number. You have to open the firewall for the port number also of course. On the WAN you then will use the router's WAN IP address and the port number for the specific Computer and application you need to communicate with. Commented May 21, 2022 at 8:08
0

The problem should be solved in the router by using different external ports to address specific IP addresses with the same internal port.

This sample beneath shows external port forwarding to two internal IP addresses with the same port number.

183.89.255.121:5911 -> 192.168.1.34:5900
183.89.255.121:5912 -> 192.168.1.38:5900

Thanks to @harrymc for making me aware of my ignorance. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .