openwrt basic, opkg basic, ipk

openwrt basic, opkg basic, ipk commands # 查看 openwrt 版本 cat /etc/openwrt_release # 更新所有软件,包括 OpenWRT 内核、固件等 opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade wan dns 在 wan 口设置里的“高级设置”选项里去掉"使用端局通告的DNS服务器"的勾选就可以使用自定义的DNS服务器 ssh port vim /etc/init.d/dropbear validate_section_dropbear > port ssh public key vim /etc/dropbear/authorized_keys dns 配置 查看本机的 DNS 配置: $ cat /etc/resolv.conf search lan nameserver 127.0.0.1 发现使用的是本机 DNS 服务器,即 dnsmasq。 查看 dnsmasq 配置: $ cat /etc/dnsmasq.conf 手动指定上游 dns vi /etc/dnsmasq.conf server=223.5.5.5 server=223.6.6.6 openwrt 改IP vi /etc/config/network opwnert init opkg install coreutils-nohup opkg install ipset opkg remove dnsmasq opkg install dnsmasq-full openwrt cron /etc/init.d/cron start /etc/init.d/cron enable crontab -e crontab -l x86, firmware download https://downloads.openwrt.org/releases/19.07.6/targets/x86/ ...

2022-08-11 · 3 min · 483 words · -

pve + openwrt

pve + openwrt 局域网网段: 192.168.50.0/24 pve 宿主机 ip: 192.168.50.6 软路由 ip: 192.168.50.1 download openwrt image 下载 “ext4-combined-efi” curl -O https://downloads.openwrt.org/releases/19.07.7/targets/x86/64/openwrt-19.07.7-x86-64-combined-ext4.img.gz curl -O https://downloads.openwrt.org/releases/21.02.3/targets/x86/64/openwrt-21.02.3-x86-64-generic-ext4-combined-efi.img.gz curl -O https://downloads.openwrt.org/releases/24.10.0/targets/x86/64/openwrt-24.10.0-x86-64-generic-ext4-combined-efi.img.gz upload image to pve # 解压出 .img 文件 gunzip openwrt-19.07.7-x86-64-combined-ext4.img.gz 把 openwrt-24.10.0-x86-64-generic-ext4-combined-efi.img 上传到 pve local pve>local(xxx)>ISO Images>upload 创建虚拟机 点击 “创建虚拟机(Create VM)”, 填写虚拟机名称 (例如 openwrt-24-10), 选"高级",勾选"开机自启动" (软路由必须开机启动) ,点击"下一步"。 OS: CD/DVD 选择 “Do not use any media”(不要去选择刚才上传的镜像),点击"下一步"。 System: 系统选项卡全部默认,点击"下一步"。 Disk: 硬盘不用改,之后会删除,会用上一步下载的 .img 镜像创建虚拟磁盘。 CPU 核心数量按需添加,一般双核足够了 内存 256MB 以上都是够的,系统有富余就多加一点,一般不用超过 2GB,点击"下一步" Network: PVE 虚拟机可选网卡模型 (虚拟网卡) 有 Intel E1000、VirtIO (半虚拟化) 、Realtek RTL8139和VMware vmxnet3四种。建议选用默认的 VirtIO (半虚拟化) ,其性能和效率最高。 分离不用的硬盘: 选择刚刚创建的虚拟机 > 硬件(Hardware) > Hard Disk(scsi0) > 点击"分离(Detach)", 然后它会变成 unused disk。 删除不用的硬盘和光驱: 选中"Unused disk 0",点击"删除";再用同样的方法删除不用的光驱。 添加启动盘 上传 Openwrt 镜像: 选择"pve"节点 > local存储空间 > 内容 > 点击上传 > 选择"openwrt-24.10.0-x86-64-generic-ext4-combined-efi.img"镜像 > 点击"上传"。 ...

2021-06-17 · 2 min · 358 words · -

软路由

软路由 GL.inet GL-BE3600 友善 R5s, NanoPi R5S Dell wyse 5070, 单臂软路由 安装PVE https://www.10bests.com/install-proxmox-ve/ PVE里面安装openwrt虚拟机 https://www.10bests.com/install-openwrt-lede-on-pve/ download x86 image ext4磁盘 个人建议用这个镜像 https://downloads.openwrt.org/releases/19.07.3/targets/x86/64/openwrt-19.07.3-x86-64-combined-ext4.img.gz 只读磁盘 https://downloads.openwrt.org/releases/19.07.3/targets/x86/64/openwrt-19.07.3-x86-64-combined-squashfs.img.gz 添加启动盘 上传Openwrt镜像: 选择"pve"节点 > local存储空间 > 内容 > 点击上传 > 选择"openwrt.img"镜像 > 点击"上传",openwrt镜像最好提前重命名一下,原来的太长了。 3. 把镜像转成虚拟磁盘并导入到虚拟机: 选择"pve"节点 > shell > 输入以下命令并回车 qm importdisk 100 /var/lib/vz/template/iso/openwrt-19.07.3-x86-64-combined-ext4.img local-lvm shell会显示vm-102-disk-0虚拟磁盘创建的进度,最后显示‘Successfully imported disk as ‘unused0:local-lvm:vm-102-disk-0’就是添加成功了。 qm importdisk是PVE导入磁盘到虚拟机的工具,后面的参数‘102’是Openwrt虚拟机的编号,‘/var/lib/vz/template/iso/openwrt.img’是刚才上传Openwrt镜像的完整目录,‘local-lvm’是PVE储存虚拟磁盘的存储空间。 导入成功后在‘Openwrt’虚拟机的"硬件"选项卡就能看到一个"未使用的磁盘0",选中它点击编辑,弹出配置窗口,设备类型选"sata",最后点击添加。 切换到虚拟机的"选项"选项卡,双击"引导顺序",第一引导项选"Disk ‘sata0’"。 交换机配置 路由器当交换机用时,在Lan上禁用dhcp Network>Interfaces>Lan>Edit>DHCP Server>General Setup>勾选 “Ignore interface” 在交换机上配置vlan, 隔离掉光猫的DHCP https://www.bilibili.com/video/BV1F5411x7GC?from=search&seid=1805628741909816644 交换机vlan 配置 LAN1: 光猫 LAN2: PVE LAN3 - 4: 其它VLAN1局域网设备 ...

2021-04-26 · 1 min · 161 words · -

单臂路由

单臂路由 openwrt设置 lan口设置 Network>interface>lan>physical settings: Lan口关闭桥接, Lan口取消桥接接口的勾选 接口选择网卡eth0 wan口设置 Network>interface>wan>physical settings: 接口选择网卡eth0 (跟lan口选择同一个网卡) Proxmox VE +openwrt|| docker + openwrt 单臂路由 Docker上运行Lean大源码编译的OpenWRT (初稿) https://openwrt.club/93.html/embed#?secret=a5nUefewHz https://www.redhat.com/sysadmin/leasing-ips-podman https://www.right.com.cn/forum/thread-941106-1-1.html https://github.com/lisaac/blog/issues/4 https://github.com/lisaac/openwrt-in-docker https://www.5yun.org/openwrt-x86-dan-bi-lu-you-dan-wang-kou-shang-wang-fang-fa.html

2020-04-25 · 1 min · 28 words · -

openwrt install

openwrt install build R7800, Build custom Netgear R7800 firmware for a larger flash size/root space http://blog.wiloon.com/?p=12113&embed=true#?secret=Z4x4I19l6b burn netgear 刷机, factory.img, sysupgrade.bin http://blog.wiloon.com/?p=12826&embed=true#?secret=G3qiDnmUJx 改网段 openwrt lan 改网段 http://blog.wiloon.com/?p=12761&embed=true#?secret=XiBcmLWKRM openvpn https://openwrt.org/docs/guide-user/services/vpn/openvpn/basic enable https for wget opkg install librt openssl-util opkg install wget ca-certificates

2018-10-29 · 1 min · 41 words · -

netgear 刷机, factory.img, sysupgrade.bin, openwrt

’netgear 刷机, factory.img, sysupgrade.bin, openwrt' xxx-factory.img 把网线连接路由器的 LAN 口 和 PC 的网口 路由器断电, 用牙签或其他工具, 捅路由器的 reset 口 开启设备电源开关, 观察电源灯 (此时保持按住 reset/ Restore Factory Settings 按钮不要松手), 直到电源灯由橙色闪烁状态变到绿色闪烁状态(wndr4300) (说明设备已经进入到了TFTP修复模式) R7800: 电源灯从橙色闪烁变成白色闪烁。 在 win 下面使用命令, tftp -i 192.168.1.1 put image0.img 在 mac 下面, 同样也是使用 tftp 命令。 自己的 ip 改成192.168.1.10, 网关即路由 ip 192.168.1.1 把下好的 img 固件放到用户文件夹下 打开终端, 输入 (binary的作用是改为二进制模式)>tftp> connect 192.168.1.1>binary>put 文件名.img完了之后路由器会闪灯后自动重启。 linux tftp (to) 192.168.1.1 tftp> binary tftp> verbose tftp> put openwrt0.img tftp> quit 文件传送完毕后,等待 80 秒左右, 设备会自动重启 (请耐心等待, 切勿将路由器手动断电)。至此, TFTP 修复完成。 设备重启后, 可手动断电, 再重启。否则可能没有5G。这不是BUG,其他openwrt也是一样的 如果恢复过程中断或失败, 重复上述步骤再做尝试。 https://www.netgear.com/support/product/WNDR4300.aspx ...

2018-10-28 · 1 min · 87 words · -

R7800 openwrt

R7800 openwrt 在ubuntu上安装如下软件包: gcc, g++, binutils, bzip2, flex, python, perl, make,find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc 头文件 sudo apt-get updatesudo apt-get install gcc g++ build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip 选择编译目标 make menuconfig Target System (Qualcomm Atheros IPQ806X) -> Target Profile (Netgear Nighthawk X4S R7800) -> 退出保存 编译固件 make V=s -j4 编译完成后 ubuntu:~/kunteng-lede$ ls bin/targets/ipq806x/generic/config.seed lede-ipq806x-R7800-squashfs-sysupgrade.tar lede-ipq806x-vmlinux.elflede-ipq806x-device-r7800.manifest ...

2018-03-22 · 1 min · 100 words · -

WNDR4300 openwrt

‘WNDR4300 openwrt’ https://wiki.openwrt.org/zh-cn/toh/netgear/wndr4300 WNDR4300 Flash容量: 128 MiB NAND RAM: 128 MiB mips, not mipsle go build … GOMIPS=softfloat WNDR4300有两种固件,一种为 …ubi-factory.img 格式,一种为 …squashfs-sysupgrade.tar 格式。 其中 img 格式只能用 tftp 的方法刷入。而 tar 只能通过已刷了Openwrt的WEB端进行刷入。 https://downloads.openwrt.org/releases/19.07.3/targets/ar71xx/nand/openwrt-19.07.3-ar71xx-nand-wndr4300-ubi-factory.img https://downloads.openwrt.org/releases/17.01.4/targets/ar71xx/nand/lede-17.01.4-ar71xx-nand-wndr4300-squashfs-sysupgrade.tar opkg update opkg install libopenssl opkg list_installed 下载img文件 http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/openwrt-15.05-ar71xx-nand-wndr4300-ubi-factory.img 进路由器界面,找到『固件升级』,然后上传这个包点确定。路由器就会自动刷成 openwrt 固件,等待它重启后再连路由器就大功告成了。 下载升级包: http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/openwrt-15.05-ar71xx-nand-wndr4300-squashfs-sysupgrade.tar稍后在 openwrt 系统里给升级。 基础设置 新的 openwrt 固件默认是不开 wifi 的,所以第一次你得用网线连上路由器,进去后应试能看到 luci 界面,这里会让你输入密码,用户名默认是 root,此时密码还是个空的,随便输一个回车进回界面, 先设置一密码吧,直接点 luci 界面上面的警告条后进入密码设置界面,输入一个你自己的密码,顺便把下面的 远程ssh给勾上。 让你的路由器连上网,按顶部菜单栏进入net-interface选择你的接口,通常是 WAN 口,点旁边的 eidt,然后选择 ppope,点切换,然后输入你的宽带帐号和密码,然后应用。 此时你的路由已经能上网了。 https://wiki.openwrt.org/zh-cn/toh/netgear/wndr4300 http://dlmao.com/wndr4300-%E6%8A%98%E8%85%BE-openwrt-%E8%AE%B0.html http://dlmao.com/wndr4300-zhe-teng-openwrt-ji-zhong-ji-xiu-zheng-ban.html https://bigeagle.me/2016/02/ipset-policy-routing/ https://php-rmcr7.rhcloud.com/openwrt-fq/ https://php-rmcr7.rhcloud.com/openwrt-fq/embed/#?secret=xcThHfkyLS https://cokebar.info/archives/948 https://cokebar.info/archives/948/embed#?secret=k8dinHiD9m https://forum.archive.openwrt.org/viewtopic.php?id=16599

2016-01-09 · 1 min · 76 words · -