frpc

参考链接

https://github.com/fatedier/frp

下载

https://github.com/fatedier/frp/releases/tag/v0.48.0
我是用的这个版本,注意下载完成后解压,并进入解压后的目录

服务器端配置

cat frp_0.48.0_linux_amd64/frps.ini
[common]
dashboard_port = 7001
# dashboard's username and password are both optional
dashboard_user = lifei
dashboard_pwd = xxxxxxxxxx
server_port = 7000
token = xxxxxxxx

客户端配置

[root@bih_hk_frpc ~]# cat /opt/frp_0.48.0_linux_amd64/frpc.ini
[common]
server_addr = x.x.x.x
server_port = 7000
token = xxxxxxx
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
#remote_port = 6008

客户端加入到systemctl


cat /usr/lib/systemd/system/frpc.service
[Unit]
Description=frpc
After=network.target

[Service]
Type=simple
ExecStart=/opt/frp_0.48.0_linux_amd64/frpc -c /opt/frp_0.48.0_linux_am
WorkingDirectory=/opt/frp_0.48.0_linux_amd64
Restart=always
RestartSec=3
User=root

[Install]
WantedBy=multi-user.target

后重启
systemctl daemon-reload
systemctl restart frpc
systemctl enable frpc

posted @ 2025-05-08 16:48  lifei888  阅读(18)  评论(0)    收藏  举报