Use FRP for intranet penetration, and use remote desktop to connect windows computers at home

Time:2021-10-27

Most home broadband do not have independent IPv4 and cannot be connected directly. FRP is an artifact of Intranet penetration. You can build FRP server through a server with public IP to forward traffic to achieve intranet penetration
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home

download
FRP is open source in GitHub:https://github.com/fatedier/frp
Download the corresponding version on the releases page. The compressed package just doesn’t work on the corresponding platform. Each package decompression includes server and client.
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home

Server side configuration
download
I use CentOS on the server side, so download “frp_0.33.0_linux_amd64. Tar. GZ” on the releases page. If the server side is another system, download the corresponding decompression.
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home
Unzip folder:

“FRPs”, “frps_full. Ini” and “FRPs. Ini” are executable files and configuration files that run on the server side.
“FRPC”, “frpc_full. Ini” and “FRPC. Ini” are executable files and configuration files that run on the client side.
Modify profile
Modify the frps.ini file with the command VI frps.ini, then save and exit:

[common]
bind_addr=0.0.0.0
bind_port = 7000
token=12310086

dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin123
explain:

“Bind_addr” is the local IP address of the server and is not changed.
“Bind_port” is the FRP listening port.
“Token” is the recommended setting for verifying the token.
“Dashboard_port” is the FRP panel port.
“Dashboard_user” “dashboard_pwd” is the account password of the panel.
All parameters except the “bind_addr” parameter can be modified as required. Be sure to remember the modified parameters.

Then give the server-side FRPs execution permission:

sudo chmod 755 ./frps
Run FRPs

./frps -c ./frps.ini
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home
You can cooperate with nohup or screen to run FRPs in the background. Pay attention to ports such as firewalls or pagodas. Log in to the web page to see if it runs successfully

Access panel
The panel is for reference only and can be used or not. Access http: / / server IP: 7500
For the 7500 port configured above, use the user name and password configured above admin / admin123
Log in to see the following interface:

Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home

Client configuration
Download FRP
The client of the demo is windows. Download the FRP Windows version “frp_0.33.0_windows_amd64. Zip” and unzip it into the folder:
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home

Modify profile
The local demo program is windows remote desktop, using port 3389. You need to use FRP to forward 3389 of Windows client to server. For example, forward the 3389 of the client to the 33389 port of the server. Open the frpc.ini file with a text editor:

[common]
server_ Addr = FRP server vpsip
server_port = 7000
token=12310086

[RDP]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 33389
Save and exit, execute in CMD

frpc.exe -c frpc.ini
Success means the connection is successful
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home
At this time, the server segment also has a connection reminder
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home
There are also prompts in the control panel
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home
If there is no prompt, please note to release the response port in the management panel such as server firewall or pagoda!

Now on any computer on the Internet, open the windows remote desktop program and enter the server IP: 33389 to connect to the local windows
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home
Be sure to turn on “allow remote connection” on Windows computer, otherwise it may fail.
Use FRP for intranet penetration, use remote desktop to connect Windows computer at home, use FRP for intranet penetration, and use remote desktop to connect Windows computer at home

principle
The server starts listening to 7000 ports according to the configuration file. The client starts the connection with the FRP 7000 port of the server according to the configuration file.
After the connection between the two is successful, the client reads the local configuration file and tells the server what forwarding operations are required to work on what port.
In the above operation, the client reads the local configuration file and tells the server that the client forwards the local port 3389 to the server port 33389.
Then, the server opens a new listening port 33389 and forwards the traffic from the external network access port 33389 to the client 3389