- 升級/降級 至 官方固件版本: 2.0.23 穩定版。操作入口在路由器常用設置-系統狀態-升級檢測處。
-
開啟SSH權限。F12打開瀏覽器的開發者模式,並切換至終端選項卡,復制以下代碼至終端處,並敲回車執行:
function getSTOK() { let match = location.href.match(/;stok=(.*?)\//); if (!match) { return null; } return match[1]; } function execute(stok, command) { command = encodeURIComponent(command); let path = `/cgi-bin/luci/;stok=${stok}/api/misystem/set_config_iotdev?bssid=SteelyWing&user_id=SteelyWing&ssid=-h%0A${command}%0A`; console.log(path); return fetch(new Request(location.origin + path)); } function enableSSH() { stok = getSTOK(); if (!stok) { console.error('stok not found in URL'); return; } console.log(`stok = "${stok}"`); password = prompt('Input new SSH password'); if (!password) { console.error('You must input password'); return; } execute(stok, ` nvram set ssh_en=1 nvram commit sed -i 's/channel=.*/channel=\\"debug\\"/g' /etc/init.d/dropbear /etc/init.d/dropbear start ` ) .then((response) => response.text()) .then((text) => console.log(text)); console.log('New SSH password: ' + password); execute(stok, `echo -e "${password}\\n${password}" | passwd root`) .then((response) => response.text()) .then((text) => console.log(text)); } enableSSH();
此時會彈出一個對話框,要求輸入密碼,請輸入並記住這個密碼,敲回車提交。
-
使用Putty 或 Xshell 終端連接路由器,MIWIFI默認網關地址為 192.168.31.1,用戶名為 root,密碼為上一步設定的密碼。
-
使用 Vim 修改防火牆配置文件:
vim /etc/config/firewall
-
將文件中
defaults
閉包下disable_ipv6
的值改為0
,zone
閉包下forward
的值改為ACCEPT
-
在原有的
Rule
中添加一個閉包,允許IPv6外網訪問路由器下游設備config rule option name 'Allow-IPv6' option target 'ACCEPT' option family 'ipv6' list proto 'all' option src '*' option dest '*'
修改完畢,保存文件並退出修改。
-
-
終端執行命令,重啟路由器防火牆:
/etc/init.d/firewall restart
-
進入路由器后台常用設置——上網設置——最底部IPv6設置,打開上方開關,上網方式修改為
Native
。 -
使用路由器進行撥號上網,確保撥號成功。
此時,外網即可訪問路由器下游設備。