Asus¶
Backup (paramètres et partition JFFS)¶
A faire avant la mise-à-jour du firmware;
Administration -> Restaurer -> Router settings -> Enregistrer les Paramètres
Administration -> Restaurer -> JFFS Partition -> Backup JFFS partition
Activer SSH et les scripts JFFS:¶
- Aller à Administration puis onglet Système.
- Activer Enable JFFS custom scripts and configs.
- Option USB Mode, choisir USB 2.0.
- Activer Enable SSH sur LAN.
- Changer le port SSH (entre 49152 et 65535).
- Activer Autoriser la connexion par mot de passe.
- Activer Enable SSH Brute Force Protection.
- Appliquer.
Effacer le cache DNS¶
$ ssh bruno@192.168.2.1 -p 26397 -v
$ killall -1 dnsmasq
Autre solution: redémarrer le routeur.
Ajouter des entrées DNS¶
Activer la partition JFFS dans les paramètres.
The idea of JFFS is to create a partition stored inside the router's flash storage to put scripts in. If you disable JFFS, it will disable the partition, meaning the firmware will no longer be able to access your config file at boot time to merge it with the main config file.
$ ssh bruno@192.168.2.1 -p 26397 -v
$ nano /jffs/configs/dnsmasq.conf.add
# ajouter la ligne "address=/clicclac.synology.me/192.168.2.7"
$ service restart_dnsmasq
Dnsmasq:¶
Configuration:¶
$ nano /etc/dnsmasq.conf
Vérifier la configuration:¶
$ dnsmasq --test
Vérifier la résolution DNS:¶
$ dig clicclac.synology.me +short
90.62.226.41
❯ dig clicclac.synology.me
; <<>> DiG 9.10.6 <<>> clicclac.synology.me
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4051
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;clicclac.synology.me. IN A
;; ANSWER SECTION:
clicclac.synology.me. 171 IN A 90.62.226.41
;; Query time: 4 msec
;; SERVER: 172.20.10.1#53(172.20.10.1)
;; WHEN: Thu Nov 26 13:20:21 CET 2020
;; MSG SIZE rcvd: 65
Bloquer un domain:¶
Ajouter dans le fichier /etc/dnsmasq.conf
:
address=/blocked.example/
address=/another.blocked.example/
ou dans un fichier séparé /etc/dnsmasq.d/blocklist.conf
:
conf-file=/etc/dnsmasq.d/blocklist.conf
# ou
conf-dir=/etc/dnsmasq.d/,*.conf
Notification de mise-à-jour:¶
https://github.com/RMerl/asuswrt-merlin.ng/wiki/Update-Notification-Example
bruno@RT-AC88U-0928:/bin# /jffs/scripts/update-notification
amtm¶
amtm est une GUI qui permet d'installer des scripts dans les routeurs Asus fonctionnant sous le firmware Asuswrt-Merlin (depuis la v384.15, amtm est installé d'office) (forum).
Préparation:
- Formater une clé USB au format ext.
- Insérer la clé dans le port USB du routeur.
- Se connecter au routeur en ssh.
- Entrer amtm ou /jffs/scripts/amtm pour ouvrir amtm.
- Avec la commander fd, formatter la clé au format ext4, avec un label (routeur). Le routeur redémarre.
Installer Diversion (AD Blocker)
-
Se connecter au routeur en ssh.
-
Entrer amtm ou /jffs/scripts/amtm pour ouvrir amtm.
-
Taper i pour voir les scripts disponibles.
-
Taper 1 pour installer Diversion
amtm 3.1.8 FW by thelonelycoder
RT-AC88U (armv7l) FW-384.19 @ 192.168.2.1
The Asuswrt-Merlin Terminal Menu
1 open Diversion v4.1.12
2 install Skynet - the Router Firewall
3 install FlexQoS - Flexible QoS Enhancement
3d install FreshJR QOS - Adaptive QOS (deprecated)
Modules installés:
- Skynet (nécessite un fichier swap de 2 Go):
- LED Control: éteint les LED de 21h30 à 7h
Désinstaller Skynet:
sh /jffs/scripts/firewall uninstall
AsusWRT-Merlin¶
https://github.com/RMerl/asuswrt-merlin.ng/wiki/Custom-config-files
https://www.drazzib.com/docs/admin/dnsmasq.html
https://wiki.archlinux.org/index.php/Dnsmasq
Asus-wrt vs Asus-Merlin:
https://www.snbforums.com/threads/dnsmasq-conf-add-without-custom-firmware.43244/
https://www.snbforums.com/threads/how-to-use-dnsmasq-conf-add.8785/
https://www.henriksommerfeld.se/firmware-update-notifications-for-my-asus-router/