frp内网穿透工具
frp的github地址:https://github.com/fatedier/frp
官方文档:https://gofrp.org/
本地主机连接其他局域网电脑
环境准备
- 一台自己使用的电脑
- 一台不同局域网的电脑
- 一台具有公网IP的服务器
安装frp内网穿透工具
下载frp安装包
linux版:
- github下载地址:https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_amd64.tar.gz
- 镜像下载地址:https://pd.zwc365.com/seturl/https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_amd64.tar.gz
windows版:
- github下载地址:https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_windows_amd64.zip
- 镜像下载地址:https://pd.zwc365.com/seturl/https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_windows_amd64.zip
服务器安装frp
配置服务器安全组
具体配置方法看不同厂家的文档说明,这里我用的是阿里云的服务器
安全组应用案例
- 我配置了7000~7500的端口范围,用于为frp服务器暴露端口用。
- 设置了全部的ip都可以访问这个服务器的端口范围。
centos7系统
cat /etc/system-release # 查看系统版本