acai

acai

对世界与新技术充满好奇
github
email

Install frps service on Linux

frp is a high-performance reverse proxy application that focuses on intranet penetration. It supports multiple protocols, including TCP, UDP, HTTP, HTTPS, etc., and has P2P communication capabilities. With frp, you can securely and conveniently expose intranet services to the public network and relay them through nodes with public IP addresses.

Self-built frps intranet penetration service, based on ubuntu22.04, record the deployment process.

Download#

Frp github precompiled release address: Releases

Download the appropriate version based on the server system and CPU architecture

wget https://github.com/fatedier/frp/releases/download/v0.54.0/frp_0.54.0_linux_amd64.tar.gz

Optional, use Jelly Proxy Download

wget https://get.66a.vip/https://github.com/fatedier/frp/releases/download/v0.54.0/frp_0.54.0_linux_amd64.tar.gz

Installation#

1. Unzip#

tar -zvxf frp_0.54.0_linux_amd64.tar.gz

2. Copy the executable file to /usr/bin/#

sudo cp frp_0.54.0_linux_amd64/frps /usr/bin/

3. Configure frps#

sudo mkdir -p /etc/frp

Create the /etc/frp/frps.toml file

sudo vim /etc/frp/frps.toml

Fill in the following content as needed

bindAddr = "0.0.0.0"
bindPort = 7000 # Bind port
kcpBindPort = 7001 # KCP bind port, optional configuration according to usage requirements
quicBindPort = 7002 # QUIC bind port, optional configuration according to usage requirements
vhostHTTPPort = 8080 # Virtual HTTP port, optional configuration according to usage requirements
vhostHTTPSPort = 8443 # Virtual HTTPS port, optional configuration according to usage requirements

# Allow the range of remote server ports that can be mapped by the penetration service
allowPorts = [ { start = 50000, end = 60000 } ]

auth.method = "token"
auth.token = "xxx" # Custom authorization token, the client needs to provide the correct token to penetrate

webServer.addr = "0.0.0.0"
webServer.port = 7500
# Dashboard username and password, optional, default is empty
webServer.user = "xxx" # Modify this item
webServer.password = "xxx" # Modify this item

4. Add to systemd service#

Create a new frps.service file

sudo vim /lib/systemd/system/frps.service

Fill in the following reference content according to the actual situation

[Unit]
# Service name, can be customized
Description = frp server
After = network.target syslog.target
Wants = network.target

[Service]
Type = simple
Restart=on-failure
RestartSec=5s
# Command to start frps, modify it to the installation path of your frps
ExecStart = /usr/bin/frps -c /etc/frp/frps.toml

[Install]
WantedBy = multi-user.target

Update the systemd service list

sudo systemctl daemon-reload

Start the frps service

sudo systemctl start frps

Configure auto-start on boot

sudo systemctl enable frps

Check the running status of frps

sudo systemctl status frps

At this point, the deployment of the frps server is complete.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.