惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

Comments for Sam's lab

PVE | Managing Virtual Machines via rest api - Sam's lab All in Web | Remote Desktop Gateway – Apache Guacamole - Sam's lab UptimeRobot | Online Website Monitoring - Sam's lab HomeLab | Hardware Selection - Sam's lab Hello world! - Sam's lab
OpenWrt | Pure Edition Installation for PVE Environments - Sam's lab
sam · 2022-07-31 · via Comments for Sam's lab

OpenWrt 一款嵌入式开源软路由系统,适用各种硬件,各种架构,插件生态非常丰富,互联网上众多第三方编译版本,集成了大量第三方插件,开箱即用,但良莠不齐

如果安装一个纯净版系统,再根据自己所需适量安装插件,或许不错。这里以在PVE环境下,安装OpenWrt VM 为例

步骤

  1. 创建VM
  1. System 页面保持默认 ,然后Next到Disks页面,设置大小为0.001,最后会移除这个disk
  1. Next到CPU页面,类型选择host模式,AES硬解
  1. 其他按需,例如memory 128M差不多够了,网卡目前保持一个。

VM创建后,导航到Hardware选项,移除刚刚创建的Disk

  1. 如果有需要,添加额外网卡,我这里以一块网卡为例,OpenWrt旁路由/代理路由 模式组网
  1. 打开PVE shell,下载openwrt 硬盘文件,下面脚本会自动从官网下载最新稳定版的openwrt磁盘文件
# lookup the latest stable version number
regex='<strong>Current Stable Release - OpenWrt ([^/]*)<\/strong>' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}"
# download openwrt image
wget -O openwrt.img.gz https://downloads.openwrt.org/releases/$stableVersion/targets/x86/64/openwrt-$stableVersion-x86-64-generic-ext4-combined.img.gz
# extract the openwrt img
gunzip ./openwrt.img.gz
# rename the extracted img
mv ./openwrt*.img ./openwrt.raw
# increase the raw disk to 512 MB
qemu-img resize -f raw ./openwrt.raw 512M
# import the disk to the openwrt vm
# update the vm id and storage device as needed
# usage: qm importdisk
qm importdisk 104 openwrt.raw local-lvm
  1. 导航到vm的Hardware页面,添加刚刚的硬盘
  1. 设置启动项及顺序,从新硬盘启动,
  1. 禁用tablet for pointer
  1. 一切就绪之后,start VM,进入系统后,更改root密码和IP信息
  1. 重启网络服务: service network restart

然后通过web登录,一个纯净的OpenWrt 就ok了

  1. 其他可选命令:
# set the lan ip address, use something in the same subnet as your LAN
uci set network.lan.ipaddr='10.10.27.151'
# restart network services
service network restart
# update openwrt packages
opkg update
# install the luci web ui
opkg install luci
  1. 开启sftp,便于上传文件(有网前提)
root@OpenWrt:~# opkg update

root@OpenWrt:~# opkg install vsftpd openssh-sftp-server

root@OpenWrt:~# /etc/init.d/vsftpd enable

root@OpenWrt:~# /etc/init.d/vsftpd start

以上。

参考资料

https://i12bretro.github.io/tutorials/0405.html

https://openwrt.org/

Post Views: 4,561