Содержание
ASUS WL-500g Premium
Попался роутер с убитой прошивкой - при включении медленно моргала лампочка питания, и больше ничего не происходило.
Восстановление
Предварительно нужно скачать родную прошивку с сайта ASUS последней версии либо ASUS Oleg's based custom firmware (её, впрочем, можно прошить позже стандартным путём через веб-интерфейс), а также утилиту tftpd.
Компьютер, с которого будет идти восстановление, должен иметь адрес в сети 192.168.1.0/24, начиная с 192.168.1.2.
- При включённом роутере зажать кнопку restore на задней панели на 30 сек.
- Продолжая держать кнопку, выдернуть питание, держать кнопку ещё 30 сек.
- Продолжая держать кнопку, включить питание, держать кнопку ещё 30 сек.
- Отпустить кнопку.
- Запустить tftpd, перейти на вкладку Tftp client. В поле Host ввести 192.168.1.1, Local file указать прошивку для роутера и затем нажать кнопку Put. Дождаться окончания процесса.
- Подождать примерно 5 минут.
- Перезагрузить роутер (по питанию), затем нажать кнопку restore на задней панели на 5 сек. для сброса настроек до заводских.
TP-Link TL-WDR3500 v1
Роутер в Коломне.
OpenWrt: https://firmware-selector.openwrt.org/?target=ath79%2Fgeneric&id=tplink_tl-wdr3500-v1
Модель TP-Link TL-WDR3500 v1 Платформа ath79/generic Версия 23.05.4 (r24012-d8dd03c46f) Дата 2024-07-17 11:29:11
https://openwrt.org/toh/tp-link/tl-wdr3500_v1
grep ARCH /etc/openwrt_release DISTRIB_ARCH='mips_24kc'
Keenetic Speedster (KN-3010)
Количество ядер 2
Объем оперативной памяти 128 МБ
Flash-память 32 МБ
Файлы загрузки на сайте производителя
Как восстановить операционную систему интернет-центра
OpenWrt: https://firmware-selector.openwrt.org/?target=ramips%2Fmt7621&id=keenetic_kn-3010
Шить squashfs factory через программу восстановления, переименовав образ. Выключить роутер, запустить программу восстановления, затем зажать на роутере кнопку reset и включить его. Отпустить кнопку reset, когда замигает светодиод, и прошивка начнётся.
grep ARCH /etc/openwrt_release DISTRIB_ARCH='mipsel_24kc'
Orange Pi PC Plus
OpenWrt: https://firmware-selector.openwrt.org/?target=sunxi%2Fcortexa7&id=xunlong_orangepi-pc-plus
Ext4 vs. SquashFS: both of them are popular filesystems on Linux system. They have a fundamental difference: ext4 is read AND writable, while squashfs is read-only.
If you just want a router up and running and manageable like a regular Linux system, go with ext4.
If you are going to play with the router a lot, such as install and uninstall packages, try different configurations, go with squashfs. This is also my personal preference.
https://openrouters.com/docs/openwrt-chose-ext4-or-squashfs-image/#ext4-vs-squashfs
ASUS RT-AX53U
https://firmware-selector.openwrt.org/?target=ramips%2Fmt7621&id=asus_rt-ax53u
# Включить на роутере ssh, скачать прошивку на комп. # Копировать под линуксом, под виндой так не сработает. Scp тоже не работает. cat openwrt-25.12.1-ramips-mt7621-asus_rt-ax53u-squashfs-factory.bin | ssh admin@device "cat > /root/openwrt.bin" # На роутере запустить прошивку и перезагрузиться mtd-write -i openwrt.bin -d Kernel reboot
Архитектура
grep ARCH /etc/openwrt_release DISTRIB_ARCH='mipsel_24kc'
Keenetic Hopper KN-3811
Архитектура
grep ARCH /etc/openwrt_release DISTRIB_ARCH='aarch64_cortex-a53'
Шьётся через утилиту рекавери путём подмены образа на OpenWRT factory (не sysupgrade!).
KeeneticOS recovery info
KeeneticOS recovery download
OpenWRT для Keenetic Hopper KN-3811
OpenWRT
https://openwrt.org/toh/start
https://firmware-selector.openwrt.org
# Просмотр логов в реальном времени logread -f
DNS для DHCP-клиентов
# DNS для DHCP-клиентов (опция 6) vi /etc/dnsmasq.conf dhcp-option=6,192.168.1.6,192.168.1.7 service dnsmasq reload
В веб-интерфейсе: Network → Interfaces → lan (edit) → Advanced settings → Use custom DNS servers
DDNS
apk update apk add ddns-scripts luci-app-ddns
- /etc/config/ddns
config ddns 'global' option ddns_dateformat '%F %R' option ddns_loglines '250' option ddns_rundir '/var/run/ddns' option ddns_logdir '/var/log/ddns' config service 'bva' option service_name 'dyn.com' option use_ipv6 '0' option enabled '1' option lookup_host 'bva.dyndns.info' option domain 'bva.dyndns.info' option username '<username>' option password '<password>' option ip_source 'network' option ip_network 'wan' option interface 'wan' option use_syslog '2' option check_unit 'minutes' option force_unit 'minutes' option retry_unit 'seconds'
firewall
Включить или выключить правило из командной строки
# Включить (enabled=1) правило с именем Alibaba uci set $(uci show firewall |grep -i alibaba |cut -d. -f1,2).enabled=1 uci commit firewall /etc/init.d/firewall reload
Как выглядит правило
firewall.@rule[1]=rule firewall.@rule[1].src='wan' firewall.@rule[1].dest='lan' firewall.@rule[1].name='Alibaba' firewall.@rule[1].dest_ip='192.168.1.66' firewall.@rule[1].target='REJECT' firewall.@rule[1].src_ip='47.240.0.0/14' '47.235.0.0/16' '47.246.0.0/16' '47.236.0.0/14' '47.255.0.0/15' '47.74.0.0/15' '47.80.0.0/13' '47.76.0.0/14' '131.72.53.0/24' firewall.@rule[1].enabled='0'
https://openwrt.org/docs/guide-user/firewall/firewall_configuration
conntrack
Если правило файрволла включено, то это не повлияет на уже установленные соединения. Чтобы прервать их, удобно установить conntrack.
apk update apk add conntrack
Использование:
# Справка conntrack -h # Прервать соединения с IP 192.168.1.23 на порт 1080 conntrack -D -p tcp -s 192.168.1.23 --dport 1080 # Прервать все соединения с IP 192.168.1.24 conntrack -D -p tcp -s 192.168.1.24 # Показать исходные IP, подключающиеся на порт 1080 conntrack -L -p tcp --dport 1080 2>&1 |awk -F ' +' '{print $5}' |grep src= |sort |uniq
https://conntrack-tools.netfilter.org/manual.html
https://man.archlinux.org/man/conntrack.8.en
youtubeUnblock
apk update
# Dependencies for nftables
apk add kmod-nfnetlink-queue kmod-nft-queue kmod-nf-conntrack
https://github.com/Waujito/youtubeUnblock
Faking strategy=tcp_check, Fragmentation strategy=none
option faking_strategy 'tcp_check' option frag 'none' option seg2delay '3' option fake_sni_seq_len '5' option fake_sni_type 'custom' option fake_custom_payload '1234567890abcdef1234' googlevideo.com ggpht.com ytimg.com youtube.com play.google.com youtu.be googleapis.com googleusercontent.com gstatic.com l.google.com youtube-nocookie.com
# fake_custom_payload - 20 hex-символов ((0..9) + "a","b","c","d","e","f" |Get-Random -Count 20) -join '' |Set-Clipboard
Telegram: поставьте дополнительный флаг --udp-stun-filter (поддерживается с версии 1.1.0)
Roblox domains:
roblox.com
arkoselabs.com
rbxcdn.com
UDP ports 49152 - 65535.
https://en.help.roblox.com/hc/en-us/articles/115005744663-Troubleshooting-Education-Networks
apk package manager
С версии 25.12 OpenWRT перешёл с opkg на apk.
OPKG Command APK Equivalent Description ------------------------------------------------------------------ opkg install <pkg> apk add <pkg> Install a package opkg remove <pkg> apk del <pkg> Remove a package opkg upgrade apk upgrade Upgrade all packages opkg files <pkg> apk info -L <pkg> List package contents opkg list-installed apk info List installed packages opkg update apk update Update package lists opkg search <pkg> apk search <pkg> Search for packages ------------------------------------------------------------------
Mihomo
Периодически отваливается. В логах такое:
{"type":"warning","payload":"[TCP] dial GLOBAL (match Match/) 127.0.0.1:40322 --\u003e <ip address>:443 error: context deadline exceeded"}
{"type":"warning","payload":"[TCP] dial GLOBAL (match Match/) 127.0.0.1:40336 --\u003e <ip address>:80 error: context deadline exceeded"}
{"type":"warning","payload":"[TCP] dial GLOBAL (match Match/) 127.0.0.1:40338 --\u003e <ip address>:443 error: context deadline exceeded"}
Т. к. помогает перезапуск, надо сделать, чтобы это было автоматически.
- /etc/config/mihomo-restart.sh
#!/bin/sh apiurl="127.0.0.1:9090" logs=$(curl -s --max-time 3 $apiurl/logs) case $logs in *error*) curl -X POST $apiurl/restart ;; esac
API: https://wiki.metacubex.one/en/api/
chmod u+x /etc/config/mihomo-restart.sh crontab -e */2 * * * * /etc/config/mihomo-restart.sh
После этого в логах почему-то ошибки, несмотря на любые исправления скрипта:
logread -fe cron Thu Jun 25 22:48:00 2026 cron.err crond[2631]: USER root pid 14633 cmd /etc/config/mihomo-restart.sh Thu Jun 25 22:50:00 2026 cron.err crond[2631]: USER root pid 14635 cmd /etc/config/mihomo-restart.sh Thu Jun 25 22:52:00 2026 cron.err crond[2631]: USER root pid 14657 cmd /etc/config/mihomo-restart.sh
Оказалось, дело вот в чём:
That is a quirk: cron uses a log function in busybox that has no input for error levels and is fixed to log everything as an «error.» Consequently every log entry by cron will be taggedcron.err, whether it is an actual error or not.
What you can do, however, is set cron itself to a different error level, it will internally decide what to send to the log – see thecronlogleveloption in/etc/config/system. Personally I set it to 9, so it will really only send actual errors.
https://forum.openwrt.org/t/periodic-temp-readings-from-collectd-to-log-files/111567/18
Так что
vi /etc/config/system option cronloglevel '9' /etc/init.d/cron restart
Базовая статья про крон: https://openwrt.org/docs/guide-user/base-system/cron
TG
IPs:
# Autonomous system (ASN) $asn = (curl.exe -sL "https://ip.guide/as62041" |ConvertFrom-Json).routes $asnReport = ,$asn.v4 $asnReport += $asn.v6 $asnReport |Set-Clipboard
cdn-telegram.org comments.app contest.com fragment.com graph.org quiz.directory t.me tdesktop.com telega.one telegra.ph telegram-cdn.org telegram.dog telegram.me telegram.org telegram.space telesco.pe tg.dev ton.org toncenter.com tx.me usercontent.dev
DoH
apk update apk add $(apk search dns-proxy |grep -E "(proxy-\d)|-ru-") # Пример вывода apk search https-dns-proxy-2026.03.18-r4 luci-app-https-dns-proxy-2026.03.18-r1 luci-i18n-https-dns-proxy-ru-26.167.80096~2df00de
Wireguard server
Варианты роутеров для прошивки под OpenWRT
| Модель | Ядер CPU | Память (МБ) | Флеш (МБ) | Разъёмов LAN | Скачать OpenWRT | Прочее |
|---|---|---|---|---|---|---|
| ASUS RT-AX53U | 2 | 256 | 128 | 3 | Download | how to flash |
| Keenetic Hopper KN-3811 | 2 | 512 | 256 | 4 | Download |
