k2p刷pandorabox
发布时间:March 21, 2018 // 分类:K2P // No Comments
买了一台别人零元购的k2p a1版(现在新版都是b1),可以刷openwrt类系统,自带系统版本V22.5.7.85。
先开启telnet,访问http://iytc.net/k2p.php根据mac生成配置文件并在路由管理界面恢复配置文件,重新启动telnet就开启了,默认密码为空。
查看当前mtd表信息:
cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00050000 00010000 "permanent_config"
mtd5: 00f60000 00010000 "firmware"
mtd6: 00c48b96 00010000 "rootfs"
mtd7: 00200000 00010000 "rootfs_data"
备份系统固件,并通过路由web下载,详见http://www.right.com.cn/forum/thread-217088-1-1.html
#备份所有
dd if=/dev/mtd0 of=/tmp/all.bin
cd /www
touch all.bin
mount --bind /tmp/all.bin /www/all.bin
#仅备份固件,后续如果恢复官方固件可以在breed界面刷入此固件。
dd if=/dev/mtd5 of=/tmp/fs.bin
cd /www
touch fs.bin
mount --bind /tmp/fs.bin /www/fs.bin
#备份eeprom
dd if=/dev/mtd3 of=/tmp/eeprom.bin
cd /www
touch eeprom.bin
mount --bind /tmp/eeprom.bin /www/eeprom.bin
使用breed刷入别的固件并引导系统,下载breed到http服务器上,自带的wget不支持https,然后在路由器上wget下载到/tmp/目录,
wget -P /tmp/ https://www.haiyun.me/breed-mt7621-phicomm-k2p.bin
mtd -r write /tmp/breed-mt7621-phicomm-k2p.bin Bootloader
Unlocking Bootloader ...
Writing from /tmp/breed-mt7621-phicomm-k2p.bin to Bootloader ...
断电按住重置按钮通电,直到电脑网卡获取到IP,访问192.168.1.1刷入PandoraBox固件
一些初始化设置,iptables:
cat <<EOF > /etc/init.d/iptables
#!/bin/sh /etc/rc.common
START=19
start() {
iptables -F
iptables -X
iptables -Z
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -N MINIUPNPD
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i br-lan -j ACCEPT
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -I FORWARD -i pppoe-wan -o br-lan -j MINIUPNPD
iptables -A FORWARD -i br-lan -o pppoe-wan -j ACCEPT
iptables -A FORWARD -i br-lan -o eth0.2 -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
#iptables -A FORWARD -p tcp --dport 12488 -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 -t nat -P OUTPUT ACCEPT
iptables -t nat -N MINIUPNPD
iptables -t nat -I PREROUTING -i pppoe-wan -j MINIUPNPD
iptables -t nat -A POSTROUTING -o pppoe-wan -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0.2 -j MASQUERADE
#iptables -t nat -A PREROUTING -p tcp --dport 12488 -j DNAT --to-destination 192.168.1.6
}
EOF
/etc/init.d/telnet disable
/etc/init.d/samba disable
/etc/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.beyang.cc/' /etc/opkg/distfeeds.conf
sed -i 's/17.09/17.11/g' /etc/opkg/distfeeds.conf
根据IP段找下载测试文件
发布时间:March 14, 2018 // 分类: // No Comments
<?php
$list = array (
'47.74.188.',
'47.74.189.'
);
$pre = array(
'test',
'100mb',
'100MB',
'1000mb',
'1000MB',
'1GB',
'1gb'
);
$ext = array('bin', 'test', 'zip', 'tar.gz');
$filename = array('test');
foreach ($pre as $p) {
foreach ($ext as $e) {
$filename[] = $p.'.'.$e;
}
}
$header = array(
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
//'Accept-Encoding: gzip, deflate, br',
'Connection: keep-alive',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
foreach ($list as $prefix) {
for ($i = 1; $i < 255; $i++) {
$ip = "http://{$prefix}{$i}/";
curl_setopt($ch, CURLOPT_URL, $ip);
$res = curl_exec($ch);
if ($res) {
foreach ($filename as $v) {
$url = $ip.$v;
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
$info = curl_getinfo($ch);
if ($info['http_code'] == 200) {
$size = $info["download_content_length"]/1024/1024;
if ($size > 50) {
echo $url.'------->'.$size.'MB'.PHP_EOL;
file_put_contents('enoctus.log', $url.'------->'.$size.'MB'."\n", FILE_APPEND);
}
} else {
echo $url.'------->'.$info['http_code'].PHP_EOL;
}
}
}
}
}
使用dig测试ECDNS
发布时间:March 13, 2018 // 分类: // No Comments
编译安装最新版本的bind:
wget -O bind-9-12.tar.gz 'https://www.isc.org/downloads/file/bind-9-12-0/?version=tar-gz'
tar zxvf bind-9-12.tar.gz
cd bind-9.12.0/
./configure --without-openssl
make
测试:
./bin/dig/dig @8.8.8.8 google.com +subnet=116.206.101.0/24
美国和香港公共dns
发布时间:March 13, 2018 // 分类: // No Comments
非原生IP使用8.8.8.8公共dns因为EDNS(公共服务器向权威服务器解析时会转发客户端IP,然后权威服务器根据客户端的IP返回相应结果),可能会被解析到ip所在国家,使用其它公共dns,
香港:
nameserver 203.80.96.10
nameserver 202.45.84.58
美国:
nameserver 9.9.9.9
nameserver 74.82.42.42
分类
- Apache (13)
- Nginx (45)
- PHP (86)
- IIS (8)
- Mail (17)
- DNS (16)
- Cacti (14)
- Squid (5)
- Nagios (4)
- Puppet (7)
- CentOS (13)
- Iptables (23)
- RADIUS (3)
- OpenWrt (41)
- DD-WRT (1)
- VMware (9)
- 网站程序 (2)
- 备份存储 (11)
- 常用软件 (20)
- 日记分析 (10)
- Linux基础 (18)
- 欧诺代理 (0)
- Linux服务 (18)
- 系统监控 (4)
- 流量监控 (7)
- 虚拟化 (28)
- 伪静态 (2)
- LVM (3)
- Shell (18)
- 高可用 (2)
- 数据库 (16)
- FreeBSD (3)
- 网络安全 (25)
- Windows (35)
- 网络工具 (22)
- 控制面板 (3)
- 系统调优 (10)
- Cisco (3)
- VPN (6)
- ROS (20)
- Vim (14)
- KMS (4)
- PXE (2)
- Mac (1)
- Git (1)
- PE (1)
- LNS (2)
- Xshell (7)
- Firefox (13)
- Cygwin (4)
- OpenSSL (9)
- Sandboxie (3)
- StrokesPlus (1)
- AutoHotKey (4)
- Total Commander (3)
- WordPress (3)
- iMacros (6)
- Typecho (2)
- Ollydbg (1)
- Photoshop (1)
- 正则 (3)
- Debian (3)
- Python (8)
- NoSQL (6)
- 消息队列 (4)
- JS (7)
- Tmux (3)
- GO (7)
- HHVM (2)
- 算法 (1)
- Docker (2)
- PT (15)
- N1 (16)
- K2P (6)
- LUKS (4)
最新文章
- 光猫拨号ImmortalWrt/OpenWRT路由获取ipv6遇到的问题
- php-fpm错误error_log日志配置
- debian-12/bookworm安装mariadb10.3和mysql5.6
- smokeping主从配置及遇到的问题
- openwrt/linux使用tcpdump/nflog ulogd记录iptables日志
- tmux bash shell自动保存history
- ImmortalWrt/OpenWRT为guest wifi网络配置ipv6 nat6
- PVE更新upgrade遇到The following packages have been kept back
- openwrt/immortalwrt修改odhcpd ipv6 preferred_lifetime和valid_lifetime
- golang版本udpxy iptv rtp多播转http单播
最近回复
- opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
- liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
- 海运: 不好意思,没有。
- zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
- 海运: 恩山有很多。
- swsend: 大佬可以分享一下固件吗,谢谢。
- Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
- 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
- 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
- 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档
- August 2024
- May 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- May 2023
- April 2023
- February 2023
- January 2023
- December 2022
- September 2022
- July 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- July 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- July 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- October 2017
- September 2017
- August 2017
- July 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- July 2016
- June 2016
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- October 2011
- September 2011
- August 2011
- July 2011