首页 > Windows开发 > 详细

CentOS7 + frp远程访问内网Windows电脑

时间:2020-05-21 23:30:00      阅读:243      评论:0      收藏:0      [点我收藏+]

1.CentOS7.3 服务端

#下载server端
wget https://github.com/fatedier/frp/releases/download/v0.33.0/frp_0.33.0_linux_amd64.tar.gz
#解压
tar -zxvf frp_0.33.0_linux_amd64.tar.gz
#进入目录
mv frp_0.30.0_linux_amd64 frp
cd frp
#运行frp
./frps -c ./frps.ini

防火墙端口

#firewalld放行端口
firewall-cmd --zone=public --add-port=7000/tcp --permanent
firewall-cmd --zone=public --add-port=3389/tcp --permanent
firewall-cmd --reload

查看 frp 进程

ps -aux | grep frp

服务端配置

bind_port = 7000
# udp port to help make udp hole to penetrate nat
bind_udp_port = 6688

dashboard_port = 7500
# dashboard‘s username and password are both optional,if not set, default is admin.
dashboard_user = admin
dashboard_pwd = admin

# AuthenticationMethod specifies what authentication method to use authenticate frpc with frps.
# If "token" is specified - token will be read into login message.
# If "oidc" is specified - OIDC (Open ID Connect) token will be issued using OIDC settings. By default, this value is "token".
authentication_method = token

# AuthenticateHeartBeats specifies whether to include authentication token in heartbeats sent to frps. By default, this value is false.
authenticate_heartbeats = false

# AuthenticateNewWorkConns specifies whether to include authentication token in new work connections sent to frps. By default, this value is false.
authenticate_new_work_conns = false

# auth token
token = 123
./frps -c ./frps.ini  
#前端开启,关闭就会失效,使用 nohup 后端运行
nohup ./frps -c ./frps.ini &

2.客户端配置

[common]
server_addr = xx.xx.xx.xx
server_port = 7000
# for authentication
token = 123

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

[mstsc]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 3389

https://github.com/fatedier/frp
https://blog.csdn.net/qq920581171/article/details/100673337
https://www.jianshu.com/p/00c79df1aaf0

3.进入阿里云控制台,添加入站规则,否则客户端可能会连接失败
(报错:[service.go:97] login to server failed: dial tcp 47.XX.XX.62:7000: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
dial tcp 47.XX.XX.62:7000: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
技术分享图片
4.IOS连接Windows10

https://www.cnblogs.com/Sungeek/p/10431149.html
https://www.feng.com/post/8557588
如果没找到,可以浏览搜索mstsc.exe

5.参考

https://zhuanlan.zhihu.com/p/129076009

CentOS7 + frp远程访问内网Windows电脑

原文:https://www.cnblogs.com/TTonly/p/12933837.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!