Frp realizes the method of remote desktop access through intranet penetration (Linux + Windows)

What is intranet penetration

Intranet penetration, that is, NAT penetration, NAT penetration is to make data packets with a specific source IP address and source port number not be shielded by the NAT device and routed to the intranet host correctly. The following describes the intranet penetration method of the relative positions of the communicating hosts on the network and the NAT device.

The essence of UDP intranet penetration is to use the NAT system on the router. NAT is a conversion technology that converts private (reserved) addresses into legal IP addresses. It is widely used in various types of Internet access methods and various types of networks. NAT can complete the reuse of addresses, and can realize external concealment for the internal network structure.

purpose

Realize the windows system to remotely control the linux system through the external network

Preliminary preparation

It is not difficult to see that we need a server that can connect to the external network. You can build it yourself or use some free online servers.
SakuraFrp is recommended here: https://www.natfrp.com/

There is a complete tutorial on creating a tunnel on SakuraFrp, you can refer to this website: https://doc.natfrp.com/#/app/http

Attach a command to view the port under linux here:

netstat -anp

Operation under Linux (Centos 7)

1. Enter the selected directory, usually the following path can be used

cd /usr/local/bin

2. Download the Linux version of Sakural Frp

curl -Lo frpc https://getfrp.sh/d/frpc_linux_amd64

3. Modify the permissions of the executable file

chmod 755 frpc

4. Open the created tunnel

frpc -f 访问密钥:隧道ID

5. When prompted that the tunnel has started successfully, you can remotely control the computer through the external network

Operation under Windows

1. Open the cmd window
2. Enter the following command to achieve remote control via SSH

ssh -p 端口 用户名@ip地址

Insert picture description here

Guess you like

Origin blog.csdn.net/daijingxin/article/details/112514542