[Telecommuting] within five minutes to achieve network penetration

Why do Laijiangjiang network map

Access to your internal network from the public network equipment has been a troublesome thing, especially to do micro-channel development. Device might be in the router, or because the operator does not give you the IP address shortage assign public IP addresses. If we want direct access to these devices, they are generally very troublesome.

  • Gangster seeking network router on the network to add to their端口映射
  • Purchase 花生壳and other dynamic DNS software
  • Free (have to pay) provided natapp and other network mapping service
  • Based on ngrok/frpinternal self-built network mapping service

Why give up ngrok, usefrp

In 2016 we provided a ngrokfree service, and shared the steps of the building can refer to "Angrok penetrate a network service" , to build step for the average user very unfriendly, behind also stopped related services turned frp.

Attention, Github comparison

Penetrate protocol support

frp support http ssh tcp udp ftp and other protocols

Started working

Ready to work

Frp build a complete service, we need

  • Public IP of a ECS
  • This domain name (if you do not need to need to parse)

Installation frp (frps)server

  • Download the installation package frp

github.com/fatedier/fr…

  • Extracting archive, modify, frps.ini
[common]
bind_port = 7000     # frps 服务启动,占用的端口
vhost_http_port = 80  # frps 服务监听转发的端口
复制代码
  • Start frpsServices
./frps -c ./frps.ini
复制代码

Installation of frp(frpc)clients

Custom domain names within the network service

  • modify frpc.ini
[common]
server_addr = ECS的公网IP
server_port = 7000

[随意但必须唯一]
type = http
local_port = 本地目标服务的端口
custom_domains = 自定义的域名
复制代码
  • Start the client
./frpc -c ./frpc.ini

复制代码
  • Access custom domain name can access the intranet services

Use ssh access to the company network within the machine

  • modify frpc.ini
[common]
server_port = 7000

[随意但必须唯一]
type = tcp
local_ip = 127.0.0.1  
local_port = 22
remote_port = 10022
复制代码
  • Start the client
./frpc -c ./frpc.ini

复制代码
  • Internal network machines by ssh access
ssh -p 10022 [email protected]
复制代码

image

Guess you like

Origin juejin.im/post/5e325019e51d453c9e15618d