Purpose: In order to realize the external network access to the internal network server and the penetration of the internal network server
1. Preparations
Prepare a cloud server, here using Alibaba Cloud server. Download frp, download address https://github.com/fatedier/frp/releases
2. Build the
frp server and unzip on our Alibaba Cloud service. Edit frps.ini, where auto_token must be the same as the auto_token configured on the client
[common]
bind_addr = 0.0.0.0
bind_port = 4443
auto_token = testtoken
Start the server:
./frps -c ./frps.ini
3. Install the client, I use the Raspberry Pi located on the intranet, so download the arm version
Unzip and enter the installation directory to
edit frpc.ini, assuming that our Alibaba Cloud server ip is 223.223.223.223
[common]
server_addr = 223.223.223.223
server_port = 4443
auto_token = testtoken
[test1]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 26666
[test2]
type = tcp
local_ip = 127.0.0.1
local_port = 8000
remote_port = 27777
Start the client
./frpc -c ./frpc.ini
4. In this way, we will proxy the 22 and 8000 ports of the Raspberry Pi, which can be accessed through 223.223.223.223:26666 and 223.223.223.223:27777. Remember to open ports 26666 and 27777 in the Alibaba Cloud security group, otherwise the default is not accessible of.