2

I have x11vnc server set up on a Lubuntu 14.04 system, using ~/.config/autostart/x11vnc.desktop to start it.

For a long time I specified exactly which machines on my network could access the server using:

Exec=x11vnc -forever -allow 172.27.123.2,172.27.123.3,172.27.123.4,172.27.123.5,172.27.123.6 -httpport 5900

However, because I do not want to manually add a new device every time, and having read the manual page for the -allow option:

By ending in a ".", it can also be a numerical IP prefix, e.g. "192.168.100." to match a simple subnet

I decided to change this line of the x11vnc.desktop file to:

Exec=x11vnc -forever -allow 172.27.123. -httpport 5900

However when I rebooted with these settings, I could not connect to the VNC server from any machine on the 172.27.123.0/24 subnet.

I also tried:

Exec=x11vnc -forever -allow "172.27.123." -httpport 5900

and

Exec=x11vnc -forever -allow 172.27.123.0/24 -httpport 5900

But was still unable to connect.

Why might this be happening, and what can I do to use the -allow option to allow access from a subnet?

1

Check your firewall and router settings

I solved the issue myself, and it wasn't anything to do with x11vnc.desktop file. The first version of the Exec line of the x11vnc.desktop file is correct.

The problem was that when I first set up the vnc server, I had set my firewall to block all clients except 172.27.123.2 to 172.27.123.6 inclusive on port 5900.

Recently, when I increased the range of addresses my DHCP server was offering, it meant that machines on my network were being given addresses higher than 172.27.123.6, and so were being blocked access to the vnc server by the firewall.

The fact I then changed my x11vnc.desktop file was irrelevant. I would have had the same problem with my old settings from clients above 172.27.123.6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.