Frp实现内网穿透服务端配置

  • frps服务端配置实例

配置文件请删除#后面文字,不然出错frps code=exited, status=1/FAILURE

[common]

bind_port = 6000 
token = 123456  

dashboard_port = 6001  #frp面板端口
dashboard_user = admin  # frp面板用户名
dashboard_pwd = admin  # frp面板用户密码

vhost_http_port = 6002  # http监听端口
vhost_https_port = 6003  # https监听端口

tcp_mux = true            
allow_ports = 6999,9000-10000  # 端口白名单
log_max_days = 7  
log_file = frps.log
log_level = info  

frps服务端 systemctl自动启动

  • frps启动 systemctl start frps
  • 自启动 systemctl enable frps
  • 重启应用 systemctl restart frps
  • 停止应用 systemctl stop frps
  • 查看应用的日志 systemctl status frps
nano /lib/systemd/system/frps.service
[Unit]
Description=fraps service
After=network.target

[Service]
Type=simple
User=root
ExecStart=/root/frps/frps -c /etc/frps/frps.ini     #frp运行命令
Restart= always
RestartSec=1min
ExecStop=/usr/bin/killall frpc

[Install]
WantedBy=multi-user.target