Step 1: Install and Configure VNC on the Intranet Server
For Ubuntu, we recommend using tightvncserver
:
|
|
Start VNC and set a password:
|
|
Modify the VNC startup configuration file:
|
|
Replace the content with:
|
|
Grant executable permissions:
|
|
Start the VNC service:
|
|
Step 2: Intranet Penetration with frp
Check if the VNC port is being listened to (usually starting from 5901, incrementing with the order of VNC service startups, e.g., vncserver :7
uses port 5907):
|
|
Similar to setting up SSH intranet penetration with frp, you need to configure two TOML files.
For frps
:
|
|
For frpc
:
|
|
The subsequent steps for setting up and starting the service are the same as for SSH.
Step 3: Open Corresponding Ports on the Cloud Server
For this example, ports 6001 and 7001 need to be opened.
Step 4: Download a VNC Tool on Your Local Machine and Connect to the Remote Desktop
A commonly used tool is RealVNC Viewer. Enter the public server IP and remote port in the address bar to connect:
Appendix: Common Commands
VNC Service Commands
Change password:
|
|
List active VNC services:
|
|
Check used VNC ports:
|
|
Kill a specific VNC service (replace X
with the display number):
|
|
Start a VNC service on a specific port:
|
|
Other Useful Commands
Check the PID of a process using a specific port:
|
|
Pitfalls and References
Black Screen Issue:
This guide provides a straightforward method to enable graphical remote access to intranet servers using frp and VNC. Happy remote desktoping!