bindPort = 7000: This is the port the server listens on (7000), and the client connects to the server through this port.
auth.token = “sunhaoyang”: This sets an authentication token. The client and server use this token to authenticate each other—like a key,only matching tokens can establish a connection.
webServer.addr = “0.0.0.0”: The web server listens on all network interfaces, making it accessible from anywhere.
webServer.port = 7500: This is the port for the web server (7500), which is used to access the FRP management interface.
webServer.user = “admin” and webServer.password = “admin_password”: These are the username and password for the web server, required for logging into the management interface.
Create the systemd service unit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
cat > /etc/systemd/system/frps.service <<-'EOF' [Unit] Description=FRP Server Service After=network.target
Now, Try logging into the web interface on port 7500 by entering http://<public IP> in your browser!
From the chart, you can see the traffic and connection information. By clicking on the left, you can view details about different types of proxy.
frpc.service
For frpc.service, please just follow the operations above, similarl to the frps.service. Have a try!
Copy the folder containing the installation package and configuration files to /usr/local/bin, and configure systemd accordingly.
1 2 3 4 5
[root@internal-sshserver ~]# mv frp_0.62.0_linux_amd64 /usr/local/bin/frp [root@internal-sshserver ~]# ls /usr/local/bin/frp frpc frpc.toml frps frps.toml LICENSE [root@internal-sshserver ~]# cd /usr/local/bin/frp [root@internal-sshserver frp]# vim frpc.toml
Supplementation of monitoring Frp server
1 2 3 4 5 6 7 8 9 10
serverAddr = "x.x.x.x" # Frps's public ip address serverPort = 7000 # Frps's listening port auth.token = "lixiaohui" # Same as the server's auth.token above [[proxies]] name = "ssh" # Proxy name type = "tcp" # Proxy type (TCP) localIP = "127.0.0.1" # Frpc's service ip address localPort = 22 # Frpc's listening port(e.g. SSH service) remotePort = 6000 # Expose port on the Frps's server for external calling
Create the systemd service unit
1 2 3 4 5 6 7 8 9 10 11 12 13 14
cat > /etc/systemd/system/frpc.service <<-'EOF' [Unit] Description=FRP Client Service After=network.target
[root@internal-sshserver ~]# systemctl daemon-reload [root@internal-sshserver ~]# systemctl enable frpc.service --now [root@internal-sshserver ~]# systemctl status frpc.service ● frpc.service - FRP Client Service Loaded: loaded (/etc/systemd/system/frps.service; enabled; preset: disabled) Active: active (running) since Fri 2025-04-25 16:29:13 CST; 14s ago Main PID: 94421 (frpc) Tasks: 4 (limit: 12140) Memory: 4.6M CPU: 7ms CGroup: /system.slice/frpc.service └─94421 /usr/local/bin/frp/frpc -c /usr/local/bin/frp/frpc.toml
Apr 25 16:29:13 internal-sshserver systemd[1]: Started FRP Client Service. Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.467 [I] [sub/root.go:149] start frpc service for config file [/usr/local/bin/frp/frpc.toml] Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.467 [I] [client/service.go:314] try to connect to server... Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.472 [I] [client/service.go:306] [66f9a7e320b717cd] login to server success, get run id [66f9a7e320b717cd] Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.472 [I] [proxy/proxy_manager.go:177] [66f9a7e320b717cd] proxy added: [ssh] Apr 25 16:29:13 internal-sshserver frpc[94421]: 2025-04-25 16:29:13.473 [I] [client/control.go:172] [66f9a7e320b717cd] [ssh] start proxy success
The bindPort=serverPort must be allowed in the settings of firewall. (E.g. ufw allow xxx/ firewall-cmd –permanent –add-port=xxx)
Some vendor/providers may filter the ports and the hardware firewall may block the nonstandard port.
systemctl enable frps.service/frpc.service may be failed. Please sudo setenforce 0 change the selinux mode from enforce to permissive, and then systemctl restart frps.service/frpc.service again.
Copyright Notice: This article is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the original author and source when sharing.