k2p刷pandorabox

买了一台别人零元购的k2p a1版(现在新版都是b1),可以刷openwrt类系统,自带系统版本V22.5.7.85
先开启telnet,访问http://iytc.net/k2pU [ R p @.php根据mac生成配置文件并在路由管理界面恢复配置文件,重新启动telnet就开启了,默认密Z H ~ 2 & ) V ^码为空。
查看当前mtd表信息:

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALg W YL"
mtd1: 00030000 00010000 "Bow = j P Fotloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd~ : 5 @4: 00050000 00010000 "permanent_config"
mtd5: 00f60000 00010000 "firmware"
mtdw E 4 z Q }6: 00c48b96 00010000 "rootfs"
mtd7: 00200000 00010000 "rootfs_data"

U & } x w份系统固件,并通过路O , e由wy e c l X e =eb下载,详见h= 5 2 D | I ; Bttp://www.right.com.cn/forum/thr@ b 0ead-217088-1-1.html

#备份所有
dd if=/dev/mtK w Qd0 of=/tmp/all.bin
cd /www
touch all.bin
mount --bind /tmp/allI v q O Y.bin /www/all.bin
#仅备份固件,后续如果恢复官方固件可以在breed界面刷入此X % G n l固件。
dd if=/dev/mtd5 of=/tmp/fs.bin
cd /www
touch fs.bin
mount --bind /tmp/fs.bin /www/fs.bin
#备份eeprom
dd if$ ? H f h a % O=/dev/mtd3 of=/tmp/eeprom.bin
cd /www
touch eeprom.bin
mount --bind /tmp/eeprom.bi7 + l ~ sn /www/eeprom.bin

使用breeZ 4 ]d刷入别u C { ,的固件并引导系统,下载breed到http服务器上,自带的wget不支持u . q h _https,然后在路由器上wget下载到/tmp/目录,

wget -P /tmp/) 7 = 5 Y  http://www.haiyun.me/breed-mt7621-phicy z 7 [ f @ X 8omm-k2p.bin
mtd -e - kr write /tmp/breed-mt7621-phicomm-k2p.bin Bootloader
Unlocking Bootloader ...
Writing from /tmp/breed-m* - J Lt7621-phicomm-k2p.bin to BootloadK h j ler ...     

断电按住重置按钮通电,直到电脑网卡获取到IP,访问192.168.1.1刷入PandoraBox固件
k2p刷pandorabox
k2p刷pandorabox
一些初始化设置,iptable^ Q t E 6s:

cat <<EOF >. a J ~ T  X d; /etc/init.d/iptables
#!/bin/sh /etc/rc.common
START=19
start() {{ j ) p 6 4 a
iptables -F
iptables -X
iptables -Z
iptables -P INPUT   DROX ? 9 A !P
iptables -P OUTPUT  ACCE` 0 # ! O # 9 J MPT
iptables -P FORWARD DROP
iptables -N MINIUPNPD
iptables -A IN4 U w 3 ] f ZPUT -i lo -j ACCEPT
iC r - @ _ a b Lptable% | * 3 [  0 Ds -A INPUT -i& 4 # W i * br-lan -j ACCEPT= s Q
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptablt 9 a F %es -I FORWARD -i pppoe-wan -o br-lan -j MINIUPNPD
iptables -A FORWARD -_ f = / ; z 4i br-lan -o pppoe-wan  -j ACCEPT
iptables -A F9 J VORWARD -i br-lan -o eth0.2  -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEF T ] 2 H u 0PTw f x Z ~ 7 9 )
#iptables -A FORWARD -p tcp --dport 1248U . t . M , p8 -j ACCEPT
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -t nat -P PREROUTING  ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -f M J N / ? `t nat -P OUTPUT      ACCEPT
iptables -t nat -W * $N MINIUPNPD
iptables -t nat -I PREROUTING -i pppoe-wan -j MINIUPNPD
i8 B Iptables -t nat -A POSTROUTING  -o pppoe-wan -j MASQUERADE
iptables -t nat -A POSTROUTING  -o eth0.2 -j MASQUERADE
#iptaba m x y 4 6les -t nat -A PREROUTING -p tcp  --dport 12488  -j DNAT --to-destination 192.1n / y Q - R68.1.6
}
EOF
/etc/init.d/telnet disable
/eR D Wtc/init.d/samba disable
/etA g 4 l j - Dc/init.d/vsftpd disable
/etc/init.d/firewall stop
/etc/init.d/firewall disable
/etc/init.d/iptables start
/etc/init.d/iptables enable
sed -i 's/downloads.pandorabox.com.cn/pandorabox.be@ * q J !yang.cc/' /etc/op` b 7 Ekg/distfeeds.conf
sed -i 's/17.09/17.11/g' /etc/opkg/distfeeI f - D ^ }ds.conf