Table of contents
2. Insufficient public IP addresses
3. Implementation method of intranet penetration
Method 2: Use certain APPs, such as peanut shells
Foreword:
This article will introduce why intranet penetration is needed and two methods to achieve intranet penetration.
1. The role of IP and port
During network transmission, "self" and "other party" are represented by IP and port.
Example 1:
Example two:
2. Insufficient public IP addresses
At home or at work, only the router has a public IP
Other computers only have LAN IPs, such as 192.168.x.x
When the local area network is different, there will be no conflict if the IP is the same. For example, the IP of your home computer and the computer at work are both 192.168.0.100, but their local area networks are different, so there is no conflict.
When computers in the local network need to access the public network (Internet of Things), they need the help of a router!
For example:
- The LAN IP of host A is 10.1.1.100. It uses port 1025 to access the public network 211.100.7.34.
- But it doesn’t have a public IP. I told the router: Brother, please help.
- The router changes the (10.1.1.100:1025) in the data packet to its own P and port (162.105.176.65:16384) and sends out the forged data packet.
- After the server receives it, it returns the data to (162.105.176.65:16384), which is the router
- After the router receives the datalook up the table: This is the data that host A wants me to get, so the purpose (162.105) in the data packet .176.65:16384) is changed to (10.1.1.100:1025) and sent to host A
- Host A receives data
From this process we can know:
- Computers on the LAN can access the public network with the help of a router
- A computer within the LAN is required to actively initiate a network connection
- The public network cannot actively access computers in the LAN
No matter who you visit, there is no record in the router. This can protect the computers in the LAN.
But in this case, you won’t be able to access the company’s files from your home computer.
Therefore, if we want to access a computer in another LAN, we need intranet penetration
3. Implementation method of intranet penetration
Method 1: Set up the router
Method 2: Use certain APPs, such as peanut shells
Example of using Peanut Shell for intranet penetration:Peanut Shell dynamic domain name resolution service-Beirui official website|Peanut Shell official website|DNS intranet penetration|Domain name registration|Sunflower Remote Control|Remote Desktop|Dandelion Router-Bairui official website
If you want to run a company, the best way is to run Nginx on a public server.
Compile on the serverNginx
1. 下载编译
- mkdir nginx
- cd nginx
- wget http://nginx.org/download/nginx-1.17.9.tar.gz
- git clone https://github.com/winshining/nginx-http-flv-module.git
- tar xzf nginx-1.17.9.tar.gz
- cd nginx-1.17.9
- ./configure --add-module=/home/book/nginx/nginx-http-flv-module
- make
- sudo make install
- 2. Modified placement statement: /usr/local/nginx/conf/nginx.conf,How to:
- 3. Start
-
sudo mkdir -p /var/log/nginx /var/tmp/nginx
sudo start-stop-daemon -S -x "/usr/local/nginx/sbin/nginx" -p "/var/run/nginx.pid"