Sometimes at work, I need to open the external network. I have been using Peanut ke before, but recently I need to penetrate the internal network. I open Peanut ke, create a connection, and prompt that the creation fails. I don’t say what the reason is, anyway, it can’t be used. up
I happen to have an Alibaba Cloud server in my hand, let's use it to build an intranet penetration server
server installation server
Direct wget download
wget https://github.com/fatedier/frp/releases/download/v0.40.0/frp_0.40.0_linux_amd64.tar.gz
Unzip after downloading
tar -zxvf frp_0.40.0_linux_amd64.tar.gz
After decompression, enter the folder and edit the frps.ini configuration file
vi frps.ini
The default is port 7000, which can be customized. I changed it to port 7777. Then you need to open this port in the Alibaba Cloud console security group
And to see if this port is already occupied by other applications
lsof -i:7777
I have already started the frp server here, so I only found the frp service
After no problem, start the service
./frps -c frps.ini
If you want to run all the time, use background startup, the command is as follows
nohup ./frps -c frps.ini > /dev/null 2> /dev/null &
So far the server has been configured and started
configure client
Download the Windows version, click the link below to download
Unzip and enter the folder, open the frpc.ini configuration file (frp client configuration file)
The first ip is the ip of the server where your server is located, and the port is the port started by the server
The following ssh configures the local ip (local_ip) and local port (local_port) that need to be received, and remote_port is the forwarding port of the server
For example, if I configure it like this, accessing my server ip+remote_port port 8008 after startup is equivalent to accessing port 8008 of the Windows client
After configuration, open cmd in the current directory and execute the following command to start
frpc -c frpc.ini
If success appears, the proxy is successful
Find an interface to access, as shown in the figure below, the access is successful