FRP内网穿透配置

github下载地址 Releases · fatedier/frp · GitHub

linux服务端安装

export FRP_VERSION=0.29.1
sudo mkdir -p /etc/frp
cd /etc/frp
sudo wget "https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz"
sudo tar xzvf frp_${FRP_VERSION}_linux_amd64.tar.gz
sudo mv frp_${FRP_VERSION}_linux_amd64/* /etc/frp

启动 ./frps -c ./frps.ini,linux后台启动 nohup command

查看frp进程  ps -ef |grep frp  第二列是进程id

结束进程kill -9 进程id

客户端配置 远程连接和https连接

[common]
server_addr = x.x.x.x
server_port = xxxx

[company_desk]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = xxxx

[company_svn]
type = https
local_ip =  192.168.2.88
local_port = 443
remote_port = 7103
custom_domains = www.xxx.com

服务端配置

[common]
bind_port = 7000
vhost_https_port = 7000
vhost_http_port = 7000
dashboard_port=7010
dashboard_user=xxx
dashboard_pwd=xxx

winsw配置开机启动frp,下载地址:Releases · winsw/winsw · GitHub

配置文件和exe一个目录

<service>
    <id>frp</id>
    <name>frp自动启动</name>
    <description>frp自动启动</description>
    <executable>frpc</executable>这里是运行的软件名
    <arguments>-c frpc.ini</arguments>这里是运行的软件配置文件
    <onfailure action="restart" delay="60 sec"/>
    <onfailure action="restart" delay="120 sec"/>
    <logmode>reset</logmode>
</service>

winsw install 安装服务

winsw uninstall 卸载服务

winsw start 开启服务

winsw stop 停止服务

winsw restart 重新启动服务

winsw status 检查服务的当前状态

最后提醒广大技术人员,内网穿透很危险,会把自己电脑暴露到外网,以前没有意识到这点,自己电脑经常开着机,想干嘛就远程一下,知道有一天电脑中了勒索病毒,所有文件都被加密了,虽然谈不上损失多少,但是引起了我的注意,以后不敢乱暴露自己的电脑了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值