开启SSH

登录路由器web管理界面,复制url中的stok=后面的字符串

1
2
3
4
5
6
7
8
stok='xxxxxxxx' #前面获取的stok值
ip='192.168.31.1' #路由器的ip地址

curl -X POST "http://$ip/cgi-bin/luci/;stok=$stok/api/xqsystem/start_binding" -d "uid=1234&key=1234'%0Anvram%20set%20ssh_en%3D1'"
curl -X POST "http://$ip/cgi-bin/luci/;stok=$stok/api/xqsystem/start_binding" -d "uid=1234&key=1234'%0Anvram%20commit'"
curl -X POST "http://$ip/cgi-bin/luci/;stok=$stok/api/xqsystem/start_binding" -d "uid=1234&key=1234'%0Ased%20-i%20's%2Fchannel%3D.*%2Fchannel%3D%22debug%22%2Fg'%20%2Fetc%2Finit.d%2Fdropbear'"
curl -X POST "http://$ip/cgi-bin/luci/;stok=$stok/api/xqsystem/start_binding" -d "uid=1234&key=1234'%0A%2Fetc%2Finit.d%2Fdropbear%20start'"

路由器web管理界面复制SNhttps://miwifi.dev/ssh计算默认密码

配置ipv6防火墙

ipv6防火墙开启状态下暴露本地设备方法
编辑/data/etc/config/firewall

添加一个规则

1
2
3
4
5
6
7
8
9
config rule 'AlloW_Ipv6'
option name 'AlloW_Ipv6'
option src 'wan'
option proto 'tcp'
option dest 'lan'
option dest_ip '::aaaa:bbbb:cccc:dddd/-64'
option family 'ipv6'
option target 'ACCEPT'

执行/etc/init.d/firewall restart重启防火墙