FRPS && FRPC 配置
1. 开启udp端口
通过ssh输入下方命令,端口是和上面的配置文件一致:
firewall-cmd --zone=public --add-port=6900/udp --permanent firewall-cmd --zone=public --add-port=6443/udp --permanent firewall-cmd --zone=public --add-port=5443/udp --permanent firewall-cmd --zone=public --add-port=808/udp --permanent firewall-cmd --zone=public --add-port=909/udp --permanent firewall-cmd --reload
2. 编辑并清空frps.ini文件
# https://www.eyuyun.com/214.html [common] bind_addr = 0.0.0.0 bind_port = 5443 kcp_bind_port = 5443 dashboard_port = 6443 #认证超时时间,默认900秒 authentication_timeout = 900 #服务端面板的登录用户名,自行设置,后面有用。 dashboard_user = YourUsername #服务端面板的登录密码,自行设置,后面有用。 dashboard_pwd = YourPassword #http端口,不要设置80,否则和宝塔面板端口号冲突 vhost_http_port = 808 #https端口,不要设置443,否则和宝塔面板端口号冲突 vhost_https_port = 909 #相当于客户端连接服务端的通关密码,随便设置,后面有用。 token = YourToken max_pool_count = 50 tcp_mux = true #你绑定域名的一级域名,假如你给远程桌面绑定frp.baidu.com,这里就填baidu.com。以后你就可以通过frp.baidu.com连接远程桌面了。还不懂?不急,后面一步步来,先照做就行了。
3. 加入后台启动
# 后台启动 nohup /root/frp/frps -c /root/frp/frps.ini &
4. 结束frp服务端命令
cd /root/frp pkill frps
5. FRPC 配置
# frpc configuration [common] # Frps(Frp服务端)的IP地址 server_addr = nas.xxx.com # Frps(Frp服务端)设置的端口 server_port = 5443 # Frps(Frp服务端)设置令牌 token = YourToken log_file = /dev/null log_level = info log_max_days = 3 tcp_mux = true protocol = tcp login_fail_exit = false user = YourUsername # 名称唯一即可 [web] # 转发本地http服务 type = tcp # 本地服务器ip local_ip = 192.168.50.1 # 本地要转发的端口(群晖默认5000为http,5001为https) local_port = 80 remote_port = 3300 use_encryption = true use_compression = true # custom_domains = nas.tenlonstudio.com //绑定的域名(这里直接填服务器IP也没有问题) [nas] type = tcp local_ip = 192.168.50.235 local_port = 5000 remote_port = 5000 use_encryption = true use_compression = true [drive] type = tcp local_ip = 192.168.50.235 local_port = 6690 remote_port = 6690 use_encryption = true use_compression = true [人人美剧] type = tcp local_ip = 192.168.50.235 local_port = 3001 remote_port = 3001 use_encryption = true use_compression = true [aria2下载] type = tcp local_ip = 192.168.50.235 local_port = 3080 remote_port = 3080 use_encryption = true use_compression = true