Tutorial on how to quickly implement remote desktop using reverse proxy software Frp intranet penetration

888u

Last update at :2024-01-25,Edit by888u

When it comes to remote desktop, everyone may think of third-party software such as TeamViewer and Sunflower. However, most of them are commercial software and are expensive; even if there is a free version, there are various limitations, and stability and security cannot be guaranteed. This article will introduce how to use "Intranet Penetration" to achieve remote desktop management.

Common solutions for achieving intranet penetration include: Frp, Ngrok, and natapp. Among them, Frp is an open source, simple, easy-to-use, high-performance reverse proxy software. It supports TCP, UDP, HTTP, HTTPS and other protocol types. The official address of reverse proxy software Frp: https://github.com/fatedier/frp

The following takes Frp intranet penetration as an example to achieve remote desktop access

Deploy Frp server to cloud server

Depending on the system platform, download the Frp source code from the link below and upload it to the cloud server

https://github.com/fatedier/frp/releases

Of course, you can also download it directly through the wget command

# Use the wget command to download version 0.37.1 wget https://github.com/fatedier/frp/releases/download/v0.37.1/frp_0.37.1_linux_amd64.tar.gz

Next, unzip the file archive

# Unzip the file tar -zxvf frp_0.37.1_linux_amd64.tar.gz

Then, use vi/vim to edit the Frp server configuration file "frps.ini"

Among them

  • bind_port is used to specify the port number of the Frp server
  • dashboard_user, dashboard_pwd, and dashboard_port are used to configure the account information and access port number of Frp background management respectively
# frps.ini[common]bind_addr = 0.0.0.0bind_port = 7777token = 12345678 # Authorization code # Configure frp background management account dashboard_user = admindashboard_pwd = admindashboard_port = 8888 enable_prometheus = true # Configure log configuration folder log_file = /var/ log/frps .loglog_level = infolog_max_days = 3

Finally, open the cloud server firewall port, configure security group rules, and run the Frp service

# Open firewall port number, configure security group rules # Configure port numbers 7777 and 8888 here # Configure service mkdir -p /etc/frpcp frps.ini /etc/frpcp frps /usr/bincp systemd/frps.service /usr/lib/ a# Start frps service systemctl enable frpssystemctl start frps

Access Frp backend management

Open the browser, access the IP address of the cloud server + the port number "8888" specified above, enter the user name and password above, and you can enter the Frp background management interface

The management interface can view the running status of Frp and the proxy statistics display in real time

Deploy the Frp client to the target computer

PS: Since the target computer is Windows, you need to download the Windows version of Frp source code first

First, modify the client configuration file "frpc.ini"

# Configure Frp client information # frpc.ini[common]server_addr = frp public network ip address #frp service public network ip address server_port = 7777 # The port number specified in frps.ini token = 12345678 # and the token in frps.ini Keep consistent [ssh]type = tcp # Communication method local_ip = 127.0.0.1local_port = 3389 # The default port of the remote access service is 3389remote_port = 6000 # Define the remote port to point to the local 3389 port through 6000

Then, use the following command in CMD to run the Frp client

# Run frp client frpc -c frpc.ini

Finally, refresh the Frp Dashboard management page to observe the connection information of the Frp client

The target computer starts automatically after booting – winsw

In order to ensure that the target computer is permanently online, you can use " winsw " to configure the client connection as a service and configure it to start automatically at boot

Project download address: https://github.com/winsw/winsw/releases

The configuration steps are as follows:

  • Download the corresponding source code according to the system version, decompress it and place it in the same directory as Frp
  • Modify the executable file name to winsw.exe
  • Create a new configuration file winsw.xml and add the command to run the Frp client

The configuration information is as follows:

# winsw.xml frp frp frp remote control client service frpc -c frpc .ini reset

Finally, open the CMD terminal as an administrator and run the following command so that the Frp client can become a system service and run in the background

# Run winsw as administrator installwinsw start

Remote Desktop Access

Through the cloud server IP + the remote access port number specified by the client, you can perform remote desktop control on the target computer

Assume that the cloud server IP is " *.*.*.* " and the remote port number specified in the Frp client configuration file is 6000

You only need to use the command " mstsc " to enter the remote desktop window, enter " *.*.*.*:6000 " on the computer, and enter the user name and password of the target computer to remotely control the target computer

Of course, you can also control the remote desktop through mobile apps, such as "RD Client"

Finally, the above achieves remote desktop control through Frp intranet penetration, but the actual experience is not very good. In fact, the uses of intranet penetration are much more than this. You can check the information to expand it yourself.

Recommended site searches: local IP address query, mainland China IP proxy online server website, registered international domain name PHP space recommendation, domain name query, foreign virtual host, windows virtual host, Hong Kong host high defense, virtual space purchase,

Tutorial on how to quickly implement remote desktop using reverse proxy software Frp intranet penetration

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码