Deploying FRP for Port Forwarding¶
This type of port forwarding program is only recommended for use on Linux-like systems. Before you begin, please allow port 6009/tcp through your firewall. Modify the configuration according to your needs. Now, please modify the following template configuration as appropriate and save it as ~/frps.ini on your server.
Danger
Forwarding to the public internet is a very dangerous action. Do not take chances or assume that your IP and port are hidden. Be sure to enable certificate verification for your services!
[common]
bind_addr = 0.0.0.0
bind_port = 6009
token = lamda
use_encryption = true
tls_enable = true
allow_ports = 2000-5000
authentication_timeout = 60
proxy_bind_addr = 127.0.0.1
max_pool_count = 15
Starting the FRPS Service¶
Execute the following script to download and start the frps server.
export VERSION=0.52.0
export PLAT=linux_amd64
export DOWNLOADURL=https://github.com/fatedier/frp/releases/download/v${VERSION}/frp_${VERSION}_${PLAT}.tar.gz
wget ${DOWNLOADURL} -O - | tar -xz
cd frp_${VERSION}_${PLAT}/frps
./frps -c ~/frps.ini
Configuring FIRERPA¶
After the service has started, create and save the following configuration to the /data/usr/properties.local file on your device. Once done, restart the device or restart FIRERPA. The service will then automatically forward its own service port to the port configured on the server.
Danger
Forwarding to the public internet is a very dangerous action. Do not take chances or assume that your IP and port are hidden. Be sure to enable certificate verification for your services!
fwd.host=Your_Server_IP
fwd.port=6009
fwd.rport=0
fwd.token=lamda
fwd.protocol=tcp
fwd.enable=true
Tip
The distributed deployment chapter also contains a relevant deployment tutorial that you can refer to.