Ubuntu 安装 frp内网穿透服务
1. 服务器端安装 frp 服务
安装命令
Github
1
2
3
4
5wget https://raw.githubusercontent.com/MvsCode/frps-onekey/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh installAliyun
1
2
3
4
5wget https://raw.githubusercontent.com/MvsCode/frps-onekey/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install
Uninstall(卸载)
1 | ./install-frps.sh uninstall |
Update(更新)
1 | ./install-frps.sh update |
根据自己需求去配置即可 如果没有特殊要求,全部回车默认就好
安装完成会提示最终的配置信息,保存下来
- frp控制台页面(frps Dashboard)
2. 客户端配置 frp 服务
笔者是直接配置再路由器上(可以直接配置到nas服务器)
配置文件详情1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27[common]
server_addr = 122.51.241.147 #公网ip
server_port = 5443
# for authentication
token = 5gZBw2jEeZUL3VlH
[ssh]
type = tcp
local_ip = 192.168.2.115
local_port = 22
remote_port = 6000
[nas]
local_ip = 192.168.2.115
local_port = 2046 #内网端口
remote_port = 2046 #外网端口
use_encryption = true
use_compression = true
custom_domains = nas.genesis.org.com #域名
[link]
local_ip = 192.168.2.1
local_port = 80 #内网端口
remote_port = 8080 #外网端口
use_encryption = true
use_compression = true
custom_domains = nas.genesis.org.com #域名
- 可在控制台查看是否代理成功
- 成功日志