当前位置:网站首页>The internal network penetration of raspberry is built and maintained. No server is required for intranet penetration
The internal network penetration of raspberry is built and maintained. No server is required for intranet penetration
2020-11-09 16:06:00 【Programmers who stay up late-】
Raspberry pie intranet penetration construction and maintenance
summary
As the title , We are mainly talking about the use of The net cloud wears the official Provide the intranet penetration function to visit the website of raspberry pie on the Internet , And by ssh Remote management .
Raspberry pie
Raspberry pie is based on Broadcom arm A microcomputer with processor architecture , The price is low , The latest version is 4B, I used 3B+, It was about 200 yuan at that time .
3B + The configuration of the version is as follows :
- Main frequency 1.4GHz,64 position 4 Nuclear ARM Cortex-A53 CPU
- 1GB LPDDR2 Memory
- 2.4GHz and 5GHz IEEE802.11.b/g/n/ac wireless network adapter , bluetooth 4.2
- 4 individual USB2.0
- HDMI
This configuration runs a static website is more than enough , After all, Alibaba cloud is cheap 1 nucleus 1G nothing more ( The main frequency will be a little higher ).
Station building
nginx
The raspberry pie officially provides a basis for Debian Of Raspberry Pi OS, So the installation software is familiar with you Ubuntu equally , First installation nginx As web server:
|
|
sudo apt install nginx |
After installation, start :
|
|
# start-up nginx, No output means successful startup |
|
|
sudo nginx |
|
|
|
|
|
# You can also take the initiative to view the process |
|
|
ps -ef | grep nginx |
Looking at the process output looks like this :
Default nginx There are configuration files that take effect directly , You can access the local area network of raspberry pie through the browser ip, For example, mine is 192.168.199.175, You can see this page , It means web server Normal service has been provided .
If you need to access your own website files , Change it nginx The configuration file of .
The cloud penetrates the intranet
The website already has , The next step is to configure intranet penetration for external network access .
stay The cloud goes through the official website Buy the tunnel and set the penetration protocol to Http (s). The intranet port is installed on it nginx The port of , The default is 80, You can make adjustments by modifying the configuration file , You can configure it here .
After confirmation, the console will generate token , Copy down .
Then install the cloud piercing client , It says raspberry pie is arm Architecture processor , So download arm Version of the cloud piercing Software , Log in to the console and you can see that :
Copy the link address , Execute the following command :
|
|
# Use wget |
|
|
wget http://xiaomy.net/download/linux/wyc_linux_arm && chmod a+rwx wyc_linux_arm |
|
|
|
|
|
# Use curl, One out of two |
|
|
curl -O http://xiaomy.net/download/linux/wyc_linux_arm && chmod a+rwx wyc_linux_arm |
After the execution is completed, the client of netcloud wear is installed , Next, start the software , Execute the following command :
|
|
./wyc_linux_arm -token The token recorded on it |
You can see the following output :
The Internet address is also available , Access the Internet domain name directly in the browser :
It's that simple , The website inside raspberry pie can be accessed by the Internet .
Operation and maintenance
Is the website finished when it's up and running ? Of course not. , Follow up may also need to face website update 、 Software update 、 Service restart, etc , These things can only be operated by remote management , That's what this part is about : adopt ssh Operation and maintenance management of raspberry pie .
In fact, in the process of building the site, we have installed some software on raspberry pie , This process is ssh Connection operation , And now all we have to do is ssh Visit the Internet address to connect to raspberry pie .
Again, the tunnel should be opened first , This configuration penetration protocol is tcp, The intranet port is sshd The port of , The default is 22 Number , Of course, it can also be modified through the configuration file , Just be consistent .
After determining , The following information will be generated , Record the Internet port 、 Domain names and tokens :
also Start again A cloud penetrating client , Use the password you just recorded , This time an external address with a port will be generated .
|
|
./wyc_linux_arm -token The token recorded on it |
Finally, you can connect raspberry pie on other machines with the following command :
|
|
ssh -p Outside the network port pi@ domain name |
This enables remote management of raspberry pie .
summary
Two tunnels were opened through the net cloud , That is to achieve the Internet access to the website , It also realizes remote management .
You may ask , Is it necessary to do this ? It's better to buy a cloud server !
I personally think the biggest cost of building a website is cloud server , Personal websites use 1 nucleus 1G Plus 1Mbps Bandwidth is usually enough . Take Alibaba cloud for example , Price per year 500 about . I started the server with this configuration hadoop It's hard work .
And it's much cheaper to wear transparent intranet , We can choose higher bandwidth according to the situation of the website . And you can bind your own domain name , The server doesn't need to be filed , Outsiders don't look different from cloud servers .
Of course, it's obviously unfair , Because we need to provide our own computers for intranet penetration 、 Electricity and energy . All in all, the cost may be about the same , But in theory, we control the performance of computers , It's much more playable , Isn't life just about tossing ?
Last , Thank you very much for the free program provided by netcloud .
版权声明
本文为[Programmers who stay up late-]所创,转载请带上原文链接,感谢
边栏推荐
- 移动安全加固助力 App 实现全面、有效的安全防护
- 5分钟GET我使用Github 5 年总结的这些骚操作!
- HomeLede 2020.11.08 v5.4.72内核 UPnP+NAS+多拨+网盘+DNS优化+帕斯沃 无缝集成+软件包
- 国际顶刊Radiology发表华为云最新联合成果,AI辅助检测脑动脉瘤
- Restart the heap_ uaf_ hacknote
- 融云完成数亿人民币 D 轮融资,将持续打造全球云通信能力
- . net report builder stimulsoft Reports.Net Release the latest version of v2020.5!
- 听说你一夜之间变了户籍,依萍如洗的打工人该如何自救?
- Full link stress testing of moral integrity -- the evolution of corpus intelligence
- .NET报表生成器Stimulsoft Reports.Net 发布最新版v2020.5!
猜你喜欢

CCF BDCI热门赛题:非结构化商业文本信息中隐私信息识别

嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王健

MES系统在工厂生产管理起到9大很重要的作用

In depth analysis of the multi-user shopping mall system from search to create a profit point

拉线式位移传感器在边坡裂缝中的作用

深入探索 Android Gradle 插件的缓存配置

Chinese programmer vs Japanese programmer, full screen shame!

arthas无网络环境下离线安装方法

Talking about PHP file fragment upload from a requirement improvement

Two ways for Tencent cloud server to build WordPress website
随机推荐
国际顶刊Radiology发表华为云最新联合成果,AI辅助检测脑动脉瘤
什么是网站【新四化】?
Help enterprises to get rid of difficulties, famous enterprises return home Engineers: success depends on it!
使用Fastai开发和部署图像分类器应用
A quick start to Shell Scripting
MES系统在工厂生产管理起到9大很重要的作用
5分钟GET我使用Github 5 年总结的这些骚操作!
【分享】接口测试如何在post请求中传递文件
我在传统行业做数字化转型(1)预告篇
Performance comparison of serialization tools such as Jackson, fastjson, kryo, protostuff
SEO建设者,有哪些说不出的苦?
Implement printf function by yourself
Restart the heap_ uaf_ hacknote
Cad2016 download autocad2016 download installation detailed tutorial CAD Download
高德全链路压测——语料智能化演进之路
js字符与ASCII码互转的方法
最新版PyCharm 2020.3 :可实现结对编程,智能文本校对等|附下载体验
使用art-Template模板获取天气预报信息
缓存的数据一致性
.NET报表生成器Stimulsoft Reports.Net 发布最新版v2020.5!











