ecklf/ac2100-openwrt-guide

no route to host 的问题(ABOUT WGET ECHO NO ROUTE)

Closed this issue · 1 comments

应该是个案

路由表和iptables都正常

wget http://192.168.31.177/busybox
# 返回 no route to host

解决:

  1. 在电脑端执行把busybox转base64
base64 ./busybox > busybox.base64.txt
  1. 复制base64到剪贴板,在router端执行
cd /tmp
echo "you base64 string" >./busybox.base64.txt
base64 -d ./busybox.base64.txt > ./busybox

3.执行busybox运行telnet server

chmod a+x ./busybox
./busybox telnetd -l /bin/sh
  1. 在本机连接telnet后执行nc文件传入
./busybox nc -l -p 18000 > ./rootfs0.bin #or kernel1.bin

5.在本机执行传入nc

nc 192.168.31.1 18000 < ./openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-squashfs-rootfs0.bin #or  xxxx.kernel1.bin

6.校验hash

sha1sum openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-squashfs-rootfs0.bin 
# b60c4dcbb1f6331009448e7a2a67d44ebc62b608  openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-squashfs-rootfs0.bin
./busybox sha1sum ./rootfs0.bin 
#b60c4dcbb1f6331009448e7a2a67d44ebc62b608  ./rootfs0.bin

其他流程不变

ecklf commented

如果你确定你是在那个有busybox的文件夹里启动的网页服务器的话,不应该强制使用这个方法吧。