Use the remote desktop that comes with Microsoft to access, but unfortunately there is no fixed public network address. In my last article, I introduced the use of ipv6 address to access, but it is inevitable that there is no way to enter the background of the router in many places. Therefore, a relatively safe way is needed, that is, the frp intranet penetrates the three solutions of the remote computer, and the quick jump
link
- Using IPv6 to Realize Public Network Access to Remote Desktop
- How to use Tencent Cloud to achieve intranet penetration
- How to use Parsec+Zerotier+moon to realize cloud computer cloud game , the ultimate solution! ! recommended must see
Preparation
- A server with a public IP (this is a must, if not, please go to the previous article or choose a third-party remote desktop tool)
- The system of the server and the client does not matter, what I demonstrate here is the ubuntu system
Specific steps
Step1. Download frp
frp is divided into client and server. The server uses the server, and the computer needs to use the client. Therefore, both devices need to install frp. The Windows version is too simple. Just download the exe suffix directly. The local client will not go into details.
You can go to GitHub to download, or you can directly use the command frp below to download . If you want to choose a specific version, just modify the download link.
wget https://github.com/fatedier/frp/releases/download/v0.44.0/frp_0.44.0_linux_amd64.tar.gz
Perform decompression operation
tar -xzvf frp_0.44.0_linux_amd64.tar.gz
After decompression, switch to the directory and modify the file frps.ini
cd frp_0.44.0_linux_amd64/
- Note that you can directly upload the locally modified frps.ini to the server through the ssh tool to replace the above, because you may be more familiar with the Windows environment. You can also modify it through vim
[common]
bind_port = 7000
dashboard_port = 7005
dashboard_user = admin
dashboard_pwd = 123456789
token = 88888888
tls_enable = true
bind_port = 7000 # The port that needs to be used at the last connection can be modified by yourself
dashboard_port = 7005 # The port of the panel
dashboard_user = admin # The user name of the panel
dashboard_pwd = 123456789 # The user password of the panel
token = 88888888 # It is recommended to set a complicated one, and the final client also needs to use
tls_enable = true # This must To set, otherwise you may not be able to connect
After the above operations are completed, don’t forget to open the corresponding port number. For domestic servers, you can directly open the corresponding port from the backend of the cloud server manufacturer. Check whether the corresponding port is successfully started. It is not so troublesome under Windows. Just drag and drop, paste and copy, and complete all operations within 5 minutes
Step2, start the server
./frps -c frps.ini
The above screen appears to prove that the opening is successful, you can open it with a browser to test whether it is successful vps address: port number
Step3, start the client
On your computer, open cmd in the folder where frp is installed, you can enter cmd at the location of the path and it will open in the current window
Don't forget to configure the client configuration file frpc.ini
, save
[common]
server_addr = vps的地址
server_port = 服务端设置的端口号
token = 自己设置的token
tls_enable = true
[RDP]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 7001
local_port = 3389 # The port that needs to be mapped locally
remote_port = 7001 # This port needs to be entered for remote access
Enter the following command at the console to open the client
frpc.exe -c frpc.ini
So far, all configurations have been successful. The next time you use Microsoft Remote Desktop, you only need to vps的地址:端口号
enter
If you have any questions, please leave a message,
Q&A:
- Why is it not easy to disconnect the connection with the VPS
? Is the server running in the background of the vps? If the screen or other background commands are not executed, the program will terminate if the vps connection is disconnected.