Centos7 frp内网穿透公网
操作系统版本 | IP | 版本 |
Centos |
10.10.10.10外网 |
7.x |
Centos |
172.21.3.220内网 |
7.x |
公网frp服务端安装
tar -xvf frp_0.21.0_linux_amd64.tar.gz
cd frp_0.21.0_linux_amd64.tar
修改frp服务端配置
vim frps.ini
[common]
#frp端口
bind_port = 7436
frp服务器端启动命令
nohup ./frps -c frps.ini &
内网frp客户端安装
tar -xvf frp_0.21.0_linux_amd64.tar.gz
cd frp_0.21.0_linux_amd64.tar
修改frp客户端配置
vim frpc.ini
[common]
#frp服务端IP
server_addr = x.x.x.x
#frp服务端端口
server_port = 7436
[ssh]
#映射协议
type = tcp
#客户端IP
local_ip = 127.0.0.1
#客户端要映射的端口
local_port = 22
#frp服务端穿透的端口也就是公网连接的端口
remote_port = 7437
frp客户端启动命令
nohup ./frpc -c frpc.ini &