How to perform openwrt intranet penetration in N1 box

Time:2020-10-24

Implementation of openwrt intranet penetration through N1 box with network cloud

Soft router situation [](http://neiwangchuantou.cn/arc…Chapter links)

N1 (already brushed into armbian) uses docker to create an openwrt container as a side route.

My intranet IP information [](http://neiwangchuantou.cn/arc…Chapter links)

Intranet IP varies from person to person. Here are my own settings

Armbian:192.168.123.2

Openwrt:192.168.123.10

Ideas [](http://neiwangchuantou.cn/arc…Chapter links)

N1’s armbian deployed network cloud penetration to 192.168.123.10:80.

Why not deploy cloud piercing directly on openwrt?

Because the openwrt under the N1 box is often updated, if it is deployed on openwrt, it needs to re install the network cloud penetration after each update, which is too troublesome.

However, the armbian system of N1 box has low update frequency, and its operation is more stable. By accessing openwrt in the N1 intranet to complete the network cloud penetration deployment, the network cloud penetration service can run stably for a long time

1 – Open Cloud penetration service [](http://neiwangchuantou.cn/arc…Chapter links)

1.1 – accessWorking platform of network cloud, selectOpening a tunnel, purchase on demand and complete payment.

My code:fzyhpv

How to perform openwrt intranet penetration in N1 boxbuy.png

2 – configure tunnel [](http://neiwangchuantou.cn/arc…Chapter links)

2.1 – accessWorking platform of network cloud-Tunnel opening / management

Edit tunnel:

Intranet address: fill in the address of openwrt in Intranet

Intranet port: 80(for accessing openwrt background control panel)

Penetration protocol: TCP

How to perform openwrt intranet penetration in N1 boxedit.png

2.2 – replication token, where the token is5p6cypqw

How to perform openwrt intranet penetration in N1 boxpass.png

3 – install cloud piercing in N1 box [](http://neiwangchuantou.cn/arc…Chapter links)

3.1 – SSH login to the intranet armbian:ssh [email protected]

3.2 – Download netcloud Linux arm version:curl -O http://xiaomy.net/download/linux/wyc_linux_arm

3.3 – Grant executable rights to netcloud traverser:chmod -R 777 ./wyc_linux_arm

How to perform openwrt intranet penetration in N1 boxdownload.png

4 – start the network cloud penetration service through the intranet [](http://neiwangchuantou.cn/arc…Chapter links)

4.1 – log in to the intranet via SSH:ssh [email protected]

4.2 – start cloud penetration

There are two ways to start netcloud penetration

Method 1: input token after running the network cloud(http://neiwangchuantou.cn/arc…Chapter links)

Execute the order./wyc_linux_arm

Enter the token as prompted

Method 2: fill in the token in the start command(http://neiwangchuantou.cn/arc…Chapter links)

Execute the order./wyc_ linux_ Arm - token = token number

See “login successful, now you can visit” xxxx.xiaomy.net:12345 , will map directly to your local 192.168.123.10:80 · “

Indicates that the penetration has been successful. You can enter the openwrt management background through the prompted domain name.

How to perform openwrt intranet penetration in N1 box27A50F14-6F8E-4325-B2C2-64824D5D3CBE

At this time, the network cloud penetration service runs in the armbian foreground and interrupts the SSH connection orctrl + cWill terminate the intranet penetration process. If you want to run through the service stably, you need to set the service to run in the background

5 – background operation network cloud penetration service [](http://neiwangchuantou.cn/arc…Chapter links)

5.1 – background start command:nohup /root/wyc_ linux_ Arm - token = token >/ wycout.txt 2>&1 &

5.2 – view startup information:cat ./wycout.txt

5.3 – view the cloud traversal process ID:ps -ef | grep wyc_linux_arm

How to perform openwrt intranet penetration in N1 boxbk.png

Stop background service:Kill process ID

Our process id just now is15537, corresponding, command:kill 15537

6 – set the network cloud to boot automatically and run in the background [](http://neiwangchuantou.cn/arc…Chapter links)

6.1 – enter crontab toolcrontab -e

6.2 – add this line at the bottom (please fill in the token yourself)

@reboot nohup /root/wyc_ linux_ Arm - token = token >/ wycout.txt 2>&1 &

After filling in, save the settings and exit

Conclusion [](http://neiwangchuantou.cn/arc…Chapter links)

Through the above settings, you can realize the stable intranet penetration of your router background.