TypechoJoeTheme

MetMan's Blog

网站页面

frp工具使用介绍

MetMan博 主
2024-02-16
/
0 评论
/
161 阅读
/
235 个字
/
百度已收录
02/16
本文最后更新于 2024年02月16日,已超过 216天没有更新。如果文章内容或图片资源失效,请留言反馈,我会及时处理,谢谢!

简介

frp是一个非常有名的内网穿透工具,功能就不多介绍了。

frp项目地址:https://github.com/fatedier/frp

本次测试使用以下版本和机器。

  • 使用0.52.3
  • frps服务器端为Linux(centos)
  • frpc客户端为Windows

Linux服务端配置

  • 下载软件包并解压缩
wget https://github.com/fatedier/frp/releases/download/v0.52.3/frp_0.52.3_linux_amd64.tar.gz
tar -zxvf frp_0.52.3_linux_amd64.tar.gz
cd frp_0.52.3_linux_amd64 
  • 配置服务器端文件frps.toml
# frps.toml 
bindPort = 7000           # frps与frpc通信端口
auth.method = "token"     # 开启token验证方式
auth.token = "xxxxxxx"    # 一长串字符串,frps.toml与frpc.toml要一致

配置服务器安全组规则,放开端口7000和7100(这个端口是在客户端配置文件中设置)的TCP协议。

  • 后台启动frps
nohup ./frps -c frps.toml &

Windows客户端使用

  • 下载软件并解压缩

https://github.com/fatedier/frp/releases/download/v0.52.3/frp_0.52.3_windows_amd64.zip

  • 设置配置文件frpc.toml
serverAddr = "Linux服务器ip"
serverPort = 7000       # 与frps.toml中bindPort一致
auth.method = "token"
auth.token = "xxxxxxx"  # 与frps.toml中auth.token一致

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22     # ssh默认是22端口,为了安全可以换成其它端口
remotePort = 7100   # ssh端口转发,在本地22与linux服务器端口7100建立链接
  • 启动frpc客户端

打开CMD窗口,进入C:\Users\user\frp_0.52.3_windows_amd64目录

frpc.exe -c frpc.toml

测试

使用外部机器利用ssh登陆机器

ssh -p 22 user_in_win@linux_ip
# 输入windows用户密码
sshfrp
朗读
赞(0)
赞赏
感谢您的支持,我会继续努力哒!
版权属于:

MetMan's Blog

本文链接:

https://blog.metman.top/index.php/archives/92/(转载时请注明本文出处及文章链接)

评论 (0)

互动读者

标签云

最新回复

暂无回复

登录
X
用户名
密码