服务端 (frps.service)
wget https://github.com/fatedier/frp/releases/download/v0.62.0/frp_0.62.0_linux_amd64.tar.gz
tar -zxvf frp_0.62.0_linux_amd64.tar.gz
mv frp_0.62.0_linux_amd64 frp
frps.service
cat /etc/systemd/system/frps.service
[Unit]
Description = frp server
After = network.target syslog.target
Wants = network.target[Service]
Type = simple
ExecStart = /root/frp/frps -c /root/frp/frps.toml
Restart=on-failure[Install]
WantedBy = multi-user.target
systemctl daemon-reload
systemctl restart frps.service
systemctl status frps.service
systemctl enable frps.service
客户端 (frpc.service)
[Unit]
Description = frpc client
After = network.target syslog.target
Wants = network.target[Service]
Type = simple
ExecStart = /root/frp/frpc -c /root/frp/frpc.toml
Restart=on-failure[Install]
WantedBy = multi-user.target
systemctl daemon-reload
systemctl restart frpc.service
systemctl status frpc.service
systemctl enable frpc.service
参考
- 简单、高效的内网穿透工具
- frp