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

推荐订阅源

T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
AWS News Blog
AWS News Blog
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
T
Threatpost
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA
F
Full Disclosure
博客园_首页
N
Netflix TechBlog - Medium
Security Latest
Security Latest
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
博客园 - Franky
P
Palo Alto Networks Blog
Project Zero
Project Zero
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
H
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
GbyAI
GbyAI

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