6300v2 梅林安装frp命令 安装完entware 安装 frpc
发现entware没有frp应该是没有.下面看的是有用的链接.没有用看了不少.费眼睛.
内网穿透路由器】外网环境下使用Frp内网穿透路由器,实现后台的远程访问
https://dengxj.blog.csdn.net/article/details/96431573
https://github.com/fatedier/frp/releases/tag/v0.38.0
各种版本对应搞吧
https://www.cnblogs.com/jasy/p/12452794.html
【内网穿透硬盘】外网环境通过FRP实现硬盘远程管理(以路由器挂载为例)
https://blog.csdn.net/deng_xj/article/details/104190679
内网穿透开机】外网环境下基于路由器广播,一键唤醒内网计算机实现远程开机
https://blog.csdn.net/deng_xj/article/details/96132932
路由器R6300v2 (梅林380_7.9.1)安装nginx + php8 完美运行 Kodexplorer 同时设置 ipv6 外网访问
https://www.cnblogs.com/zhaoker/p/16279954.html
在使用FRP的过程中,由于命令太多,所以整理出相关的FRP命令,希望能帮助到大家,如果有不足的地方,也请在文章底部留言,感谢大家的完善。
注意:在FRP文件目录中操作
公网服务端 frps 相关命令
[root@centos frp]# ./frps -v #显示版本号
[root@centos frp]# ./frps -h #显示帮助说明
[root@centos frp]# ./frps -c ./frps.ini #启动 frps ,关闭SSH窗口即停止运行
[root@centos frp]# cat frps.ini #查看服务端 frps.ini 配置文件
[root@centos frp]# ps -ef |grep frps|grep -v grep #frps服务端进程状态
[root@centos frp]# nohup ./frps -c ./frps.ini >/dev/null 2>&1 & #frps服务端后台运行
[root@centos frp]# ps -ef |grep frps|grep -v grep |awk '{print $2}'|xargs kill -9 #frps服务端-停止
BashCopy
查看版本号
[root@centos frp]# ./frps -v #显示版本号
0.30.0
[root@centos frp]# ./frps -h #显示帮助说明
frps is the server of frp (https://github.com/fatedier/frp)
Usage:
frps [flags]
Flags:
--allow_ports string allow ports
--bind_addr string bind address (default "0.0.0.0")
-p, --bind_port int bind port (default 7000)
--bind_udp_port int bind udp port
-c, --config string config file of frps
--dashboard_addr string dasboard address (default "0.0.0.0")
--dashboard_port int dashboard port
--dashboard_pwd string dashboard password (default "admin")
--dashboard_user string dashboard user (default "admin")
--disable_log_color disable log color in console
-h, --help help for frps
--kcp_bind_port int kcp bind udp port
--log_file string log file (default "console")
--log_level string log level (default "info")
--log_max_days int log max days (default 3)
--max_ports_per_client int max ports per client
--proxy_bind_addr string proxy bind address (default "0.0.0.0")
--subdomain_host string subdomain host
-t, --token string auth token
-v, --version version of frpc
--vhost_http_port int vhost http port
--vhost_http_timeout int vhost http response header timeout (default 60)
--vhost_https_port int vhost https port
[root@centos frp]#
BashCopy
内网客户端 frpc 相关命令
[root@centos frp]# ./frpc -v #显示版本号
[root@centos frp]# ./frpc -h #显示帮助说明
[root@centos frp]# ./frpc -c ./frpc.ini #启动 frpc ,关闭SSH窗口即停止运行
[root@centos frp]# cat frpc.ini #查看客户端 frpc.ini 配置文件
[root@centos frp]# ps -ef |grep frpc|grep -v grep #frpc客户端进程状态
[root@centos frp]# nohup ./frpc -c ./frpc.ini >/dev/null 2>&1 & #frpc客户端后台运行
[root@centos frp]# ps -ef |grep frpc|grep -v grep |awk '{print $2}'|xargs kill -9 #frpc客户端-停止
BashCopy
查看版本号
[root@centos frp]# ./frpc -v #显示版本号
0.30.0
[root@centos frp]# ./frpc -h #显示帮助说明
frpc is the client of frp (https://github.com/fatedier/frp)
Usage:
frpc [flags]
frpc [command]
Available Commands:
help Help about any command
http Run frpc with a single http proxy
https Run frpc with a single https proxy
reload Hot-Reload frpc configuration
status Overview of all proxies status
stcp Run frpc with a single stcp proxy
tcp Run frpc with a single tcp proxy
udp Run frpc with a single udp proxy
xtcp Run frpc with a single xtcp proxy
Flags:
-c, --config string config file of frpc (default "./frpc.ini")
-h, --help help for frpc
-v, --version version of frpc
Use "frpc [command] --help" for more information about a command.
[root@centos frp]#
在梅林路由上搭建 frp 服务实现远程连接
服务端配置
1、前往 github 下载适合路由器版本的软件。
项目地址:https://github.com/fatedier/frp/releases
2、安装 WinSCP 文件传输工具,连接到路由器上,将下载好的文件上传到路由器当中。

3、右键对文件夹进行权限分配,设置 frp 文件夹的权限为 755。

4、通过 SSH 远程到服务器上,进入 frp 文件夹中,对服务端配置文件进行修改。
cd frp_0.24.1 #打开frp文件夹 vi frps.ini #修改frp服务端配置文件 //对以下内容进行修改
[common]
bind_port = 7000 #服务端穿透监听端口 dashboard_port = 7001 #服务端控制面板访问端口
5、配置完成后保存退出,启动 frp 服务。
./frps -c frps.ini

6、防火墙放行指定端口。首先打开 jffs 功能,然后在 /jffs/scripts/ 下新建一个文件,名为 firewall-start,并赋予 755 权限,写入以下内容,然后重启路由器。
#!/bin/sh iptables -I INPUT -p tcp --dport 7000 -j ACCEPT iptables -I INPUT -p tcp --dport 7001 -j ACCEPT iptables -I INPUT -p tcp --dport 7002 -j ACCEPT

客户端配置
1、前往 github 下载 windows 版本的软件,并解压到 D 盘根目录下。
项目地址:https://github.com/fatedier/frp/releases

2、配置 frpc.ini 文件,写入以下配置信息,并以 uft-8 的编码格式保存。
[common] server_addr = 192.168.1.1 #服务端的IP地址 server_port = 7000 #服务端穿透监听端口
[ssh]
type = tcp #网络服务类型 local_ip = 127.0.0.1 #本地穿透服务的IP地址 local_port = 3389 #本地穿透服务的端口 remote_port = 7002 #服务端的远程端口
3、配置完成后,打开运行输入 cmd 进入控制台,启动 frpc 客户端。
cd d:frpc_0.20.0_windows_386 frpc.exe -c frpc.ini

4、在其他电脑上,在远程软件上输入服务端的远程端口,即可实现对客户端的远程连接。

本文为原创文章,著作权归作者所有:来自「KOBIN 技术随笔」作者的原创作品,转载请标明出处。
在梅林路由上搭建 frp 服务实现远程连接
https://blog.kobin.cn/blog/network/n2/214.html