下载安装包
https://github.com/fatedier/frp/releases
安装服务器
删除frpc,frpc.ini,frpc_full.ini
frpc*是客服端代码
vi frps.ini
[common]
bind_port = 7000
token=49ba59abbe56e057
authentication_timeout=900
dashboard_port=6999
dashboard_user=admin
dashboard_pwd=admin@jkfrp
log_file=./logs/frps.log
log_level=info
log_max_days=7
安装客服端
删除frps,frps.ini,frps_full.ini
vi frpc.ini
[common]
server_addr = #云地址 frp服务器安装地址
server_port = 7000
token=49ba59abbe56e057
[ssh_6199]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6199 #服务器映射端口
客服端设置开机自起
vim /usr/lib/systemd/system/frpc.service
内容
[Unit]
Description=frpc
After=network.target
[Service]
TimeoutStartSec=30
ExecStart=/usr/local/frp/frp_0.36.2_linux_386/frpc -c /usr/local/frp/frp_0.36.2_linux_386/frpc.ini
ExecStop=/bin/kill $MAINPID
[Install]
WantedBy=multi-user.target
命令:
systemctl enable frpc
systemctl start frpc
systemctl status frpc