PDA

View Full Version : Kali noVNC as a service



nuke
2022-12-20, 07:08
I used
"Kali In The Browser (noVNC)" - https://www.kali.org/docs/general-use/novnc-kali-in-browser/
tutorial on installing and setting up noVNC - all good. Now I am trying to set it up as a service and it doesn't work.

Here are my files:
x11vnc.service


Description="x11vnc"
Requires=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth guess -rfbauth /etc/x11vnc.pass
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
Restart-sec=2

[Install]
WantedBy=multi-user.target


novnc.service


[Unit]
Description = start noVNC service
After=syslog.target network.target

[Service]
Type=simple
User=kali
ExecStart = /usr/share/novnc/utils/novnc_proxy --listen 8081 --vnc localhost:5900

[Install]
WantedBy=multi-user.target


Journal:


Dec 11 08:52:55 kali-raspberry-pi novnc_proxy[4140]: 192.168.8.103 - - [11/Dec/2022 08:52:55] 192.168.8.103: Plain non-SSL (ws://) WebSocket connection
Dec 11 08:52:55 kali-raspberry-pi novnc_proxy[4140]: 192.168.8.103 - - [11/Dec/2022 08:52:55] 192.168.8.103: Path: '/websockify'
Dec 11 08:52:55 kali-raspberry-pi novnc_proxy[4140]: 192.168.8.103 - - [11/Dec/2022 08:52:55] connecting to: localhost:5900
Dec 11 08:52:55 kali-raspberry-pi novnc_proxy[4140]: 192.168.8.103 - - [11/Dec/2022 08:52:55] Failed to connect to localhost:5900: [Errno 111] Connection refused
Dec 11 08:52:56 kali-raspberry-pi novnc_proxy[4141]: 192.168.8.103 - - [11/Dec/2022 08:52:56] 192.168.8.103: Plain non-SSL (ws://) WebSocket connection
Dec 11 08:52:56 kali-raspberry-pi novnc_proxy[4141]: 192.168.8.103 - - [11/Dec/2022 08:52:56] 192.168.8.103: Path: '/websockify'


I didn't make any changes, why I am getting "websockify" error?

Fred Sheehan
2022-12-21, 00:42
You have a permissions issue stopping the VNC server from connecting to the local host;

11/Dec/2022 08:52:55] Failed to connect to localhost:5900: [Errno 111] Connection refused