Use frp be within the network penetration

Access to your machine from the public network ip -'ve been using peanut shells, NATAPP like; either paid or random variation of domain name or slow. frp can solve this kind of problem.

Frp set up servers within the network penetration, available and recommended, can achieve good speed and can theoretically open any port you want, you can achieve much more than file-sharing or remote desktop

Preparation: a public network ip server (domain name can have a map with the ip access if you want to map port 80 need to meet nginx)

frp address

Server configuration

在 github 找到你电脑架构对应的版本下载
wget https://github.com/fatedier/frp/releases/download/v0.31.0/frp_0.31.0_linux_amd64.tar.gz
解压
tar -zxvf frp_0.31.0_linux_amd64.tar.gz
重命名文件夹
mv frp_0.31.0_linux_amd64  frp 
cd frp
ls 


Here the service side, we just need to focus on frps, frps.ini
edit frps.ini file

[common]
bind_port = 7000
dashboard_port = 7500
token = 12345678
dashboard_user = admin
dashboard_pwd = admin
  1. bind_port represents a port of the client and server connections, the port number after we configure the client to use when.
  2. dashboard_port is the port the server dashboard, the use of port 7500, the service startup configuration can be accessed through the public network ip Browser: 7500 View frp run information service.
  3. token password for client and server connections, and to set their own record, will be used later.
  4. dashboard_user and dashboard_pwd means to open the dashboard page login user name and password, you can set up on their own.

run

./frps -c frps.ini 运行 
nohup ./frps -c frps.ini & 后台运行
frpc reload -c ./frpc.ini 重载配置
ps -ef|grep frp 找frp应用进程 

Client Settings

frp client is what we really want access to that piece of equipment, in most cases it should be a Windows host, use the Windows hosts here to do an example; a Linux-like configuration.

在 github 找到你电脑架构对应的版本下载 解压
https://github.com/fatedier/frp/releases/download/v0.31.0/frp_0.31.0_windows_amd64.zip
编辑 frpc.ini 这个文件 
[common]
server_addr = 服务器地址
server_port = 7000
token = 12345678

[rdp]  规则名称自定义
type = tcp 用什么协议
local_ip = 127.0.0.1           
local_port = 8521 映射本地端口
remote_port = 8521  服务器端口 映射本地端口

run

./frpc -c frpc.ini 

Full configuration

frps complete profiles (server)

frpc full profile (client)

Published 39 original articles · won praise 0 · Views 127

Guess you like

Origin blog.csdn.net/yakax/article/details/104401476