利用frp 穿透到内网的http/https网站,实现对外开放

frp Server 端配置,在能上外网的公有云服务器上。

# cat frps.ini
[common]
authentication_method = token
bind_port = 9090
log_level = debug
tls_only = false
tcp_mux = true

启动frps服务 :nohup ./frps -c frps.ini  &

在windows的客户端安装 frp_0.37.0_windows_amd64 

配置透传转发如下:

frpc.ini文件配置

[common]

server_addr= 47.XX.XX.209   (47这个ip 是ECS服务器上的对外访问EIP)

注意此处配置公有云服务器对外访问IP地址

server_port= 9090

[edd-web]

type= tcp

local_ip=127.0.0.1

local_port=8888

remote_port=9888

配置完启动客户端服务  frpc.exe 

 frps.ini 文件配置

[common]
bind_port = 7000

配置完启动 frps服务  frps.exe

此时frps配置的意义是,使内网本地的服务器 8888端口启动的服务,可以通过公有云上对外访问ip进行透传访问。

通过访问 http://47.XX.XX.209:9888   转到内网的 127.0.01:8888的服务上。

 

posted @ 2022-04-25 14:24  beawh  阅读(346)  评论(0编辑  收藏  举报