Use frp intranet penetration

Using frp to penetrate the intranet is a common way to expose local services to the public network. To achieve frp intranet penetration, you can follow the steps below:

First, you need to download and install the frp client. You can download the corresponding client from the frp official website and choose the appropriate version according to your operating system: https://github.com/fatedier/frp/releases.

Configure the local services you need to expose on the frp client. Open the frp configuration file, usually named frpc.ini, and add a new [common] configuration item, which includes the following settings:

type: protocol type, the default is tcp, and it can also be set to udp.

local_ip: The IP address of the intranet service, which can be 127.0.0.1 or the real intranet IP.

local_port: The port number of the intranet service.

remote_port: The port number on the public IP address.

server_addr: The IP address of the frp server, you can use the official public server provided by frp or the server you built yourself.

server_port: The port number of the frp server.

Start the frpc client. Execute the following command at the command line to start the frpc client:

   ./frpc -c frpc. ini

If you are using Windows, you need to execute the following command (assuming the configuration file path is D:\frpc.ini):

   frpc.exe -c D:\frpc.ini

Configure forwarding rules. On the frp server you need to add the corresponding port forwarding rules for the frpc client to forward external traffic to your local service. On the frp server, open the frps.ini configuration file and add a new [common] configuration item, and set remoteport to the port number on the public IP address and localport to the local service you specified in frpc.ini The port number.

Start the frp server. Execute the following command at the command line to start the frp server:

   ./frps -c frps.ini

If you are using Windows, you need to execute the following command (assuming the configuration file path is D:\frps.ini):

   frps.exe -c D:\frps.ini

Wait for a while, the frp client and server will establish a connection, and you can now access your local application through the domain name and port number.

Please note that since the internal network penetration of the frp method is realized through public network transmission, the security and stability may be threatened. It is recommended that you use encryption protocols such as HTTPS or SSL on public networks, or use other security means such as VPN networks to ensure data security and stability.

Guess you like

Origin blog.csdn.net/qq1507171150/article/details/131122677