debian安装frp内网穿透以及域名访问内网资源

需要的资源:

        1.公网服务器

        2.域名一个

下载:

wget https://github.com/fatedier/frp/releases/download/v0.41.0/frp_0.41.0_linux_amd64.tar.gz

 解压:

tar -xzvf frp_0.41.0_linux_amd64.tar.gz

 进入目录:

cd frp_0.41.0_linux_amd64

 安装配置:

cp frps /usr/bin/

mkdir /etc/frp

cp frps.ini /etc/frp/

cp frps /etc/frp/

cp frps /usr/bin/

cp ./systemd/frps.service  /etc/systemd/system/

 打开配置文件:

vim /etc/frp/frps.ini

服务端配置信息: 

[common]

bind_port = 7100                       #客户端连接的端口

vhost_http_port = 80                   #服务器访问的端口

subdomain_host = xxx.com               #准备的域名

dashboard_port = 7500                  #frp后台访问端口

dashboard_user = admin                 #后台访问用户名

dashboard_pwd = admin                  #后台访问密码

token = freefrp                        #客户端连接token

max_pool_count = 10                    #最大连接数

log_file = ./frps.log                  #日志路径

log_level = info                       #日志信息

log_max_days = 3

启动frps

systemctl start frps

服务器开机自动启动frps

systemctl enable frps

重启frps

systemctl restart frps

停止frps

systemctl stop frps

查看日志

systemctl status frps

客户端配置信息:

[common]
server_addr = xx.xx.xx.xx    #服务器IP
server_port = 7100           #frp连接端口
token = freefrp              #token与服务器一致
user = xxxxxx                #用户

[web]
type = http
local_port = 80              #内网端口
subdomain = xxxxxx           #二级域名名称   xxx.xxx.com

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值