Ir al contenido
  1. Publicaciones/

Asus RT-AC68U: Bloquear publicidad con Diversion Adblocker

··933 palabras·5 mins
Tabla de contenido

Diversion es una serie de scripts para bloquear la publicidad en nuestro router, seguimiento del log de Dnsmasq, instalador de Entware, pixelserv-tls y otras utilidades más en routers con firmware Merlin

Instalación #

Debemos conectarnos al terminal del router, e introducir el siguiente comando

curl -Os https://diversion.ch/install && sh install

Cuando termine de descargarse, comenzara su instalación, el script consta de un asistente de ayuda para facilitar su instalación, pulsando 1 comenzara la instalación.

____  _                    _

|  _ \(_)_   _____ _ __ ___(_) ___  _ __

| | | | \ \ / / _ \ '__/ __| |/ _ \| '_ \

| |_| | |\ V /  __/ |  \__ \ | (_) | | | |

|____/|_| \_/ \___|_|  |___/_|\___/|_| |_|



This is Diversion 4.0.3    coded by thelonelycoder

____________________________________________________



Welcome to Diversion - the Router Adblocker!


Diversion is not installed on this router...

____________________________________________________


Install it now? [1=Yes e=Exit]

1

Seleccionamos que versión vamos a instalar, Diversion Lite o Diversion Standard, la diferencia radica en que el primero no instala pixelserv-tls

 ?  Select Diversion Edition to install



 1. Diversion Lite        SSH UI, Entware,

no pixelserv-tls



2. Diversion Standard    SSH UI, Entware,

with pixelserv-tls



Select Edition [1-2 e=Exit] 1

Ahora podemos elegir entre activar o no el log para _Dnsmasq_​, esta opción la podemos activar ahora o posteriormente cuando ejecutemos diversion

 ____________________________________________________

 ?  Select Logging state



 Dnsmasq can create a log file of all DNS queries.

The log is helpful for the curious, will show

stats in the header and allow the weekly stats

report to be run.

Logging can be enabled or disabled anytime.



Enable logging now? [1=Yes 2=No] 1

Podemos contribuir en el soporte de los foros SmallNetBuilder.com no filtrando la publicidad de ciertos sitios, en estos foros es donde se da soporte tanto a Diversion como al firmware Merlin

 i  Supporting SmallNetBuilder.com



 To support SmallNetBuilder.com, some domains are

 added to the whitelist to allow ads on their

 websites.


Please do not remove them. Thanks


!  Press [Enter] to acknowledge

i  Probing for Entware

i  Entware not installed, running checks

!  Corrected invalid Entware symlink

✔  Entware checks passed

Seleccionamos el disco USB en donde se va instalar, en mi caso tengo conectados dos discos USB en el router, sdb y otro etiquetado como 8GB, como pueds ver, he elegido la opción 2, 8GB

____________________________________________________

?  Select device to install Entware to


1. /tmp/mnt/sdb

2. /tmp/mnt/8GB



Select device [1-2] 2



i  Running device checks

✔  Device checks passed

La instalación se inicia pulsando la tecla Enter

 ____________________________________________________


 ✔  Diversion is now ready to install,

this process runs fully automatic.


!  Press [Enter] to continue

Se descargan los paquetes necesarios



 Downloading http://bin.entware.net/armv7sf-k2.6/libgcc_7.3.0-8_armv7-2.6.ipk

 Installing libssp (7.3.0-8) to root...

Downloading http://bin.entware.net/armv7sf-k2.6/libssp_7.3.0-8_armv7-2.6.ipk

Installing librt (2.23-8) to root...

....
....
....

Entware uses separate locale-archive file independent from main system

Creating locale archive - /opt/usr/lib/locale/locale-archive

Adding en_EN.UTF-8

Adding ru_RU.UTF-8


...............

...............

..............

Configuración #

Cuando termine la instalación, se iniciara el programa para que realizemos una primera configuración, aunque posteriormente se puede modificar, o bien salir del programa pulsando la tecla e


 Diversion 4.0.3                  by thelonelycoder



 RT-AC68U (armv7l) FW-384.7 @ 192.168.1.1



 56,193  blocked domains  1  hosts file(s) in use

 (no ads counted yet, stats not available)

 ____________________________________________________



 d   Diversion Lite       enabled

 c   communication        DivUn stats backup FWun



 a   ad-blocking          to IP 0.0.0.0

 l   logging              /opt/var/log/dnsmasq.log



 ep  entware packages



 b   blocking file        Standard Thu @ 2:00

 el  edit lists



 f   follow dnsmasq.log



 e   exit Diversion                 more options  o

 ____________________________________________________



 Done  Diversion Lite v4.0.3 install.

The install log can be viewed in  sf



Start command for Diversion is  diversion



What do you want to do?



What do you want to do?  e

Para acceder al programa ejecutamos diversion desde la terminal, las opciones son sencillas de entender, por ejemplo, podemos elegir la lista de hosts a bloquear pulsando la tecla b

 What do you want to do?  b

 ____________________________________________________


 Blocking file options:


1. Change composition Standard  fs

2. Enable Plus hosts

3. Change update day and time

4. Update file now

5. Find domain in hosts file(s)


Enter selection [1-5 e=Exit]

Seleccionamos 1


Enter selection [1-5 e=Exit] 1

____________________________________________________



1. Select a predefined list

2. Customize hosts list

3. Enable Blocking file fast switch  fs



Enter your selection: [1-3 e=Exit]





Enter your selection: [1-3 e=Exit] 1

Otra vez *1


____________________________________________________

Select predefined blocking list to use.



Your current type is Standard



1. Small

  someonewhocares.org, pgl.yoyo.org,

  github.com/hoshsadiq/adblock-nocoin-list,

  zerodot1.gitlab.io/CoinBlockerLists/hosts.

  Restricted blocking of Ads. If unsure, start here.

  Filesize: ~840 KB, ~28'100 blocked hosts.



2. Standard

  github.com/StevenBlack/hosts.

  Good mix of blocked domains.

  Filesize: ~1.81 MB, ~62'600 blocked hosts.



3. Medium

  github.com/StevenBlack/fakenews-gambling-porn,

  adblock.mahakala.is.

  Comprehensive list of blocked domains.

  Filesize: ~7.7 MB, ~270'000 blocked hosts.



4. Large

  github.com/StevenBlack/fakenews-gambling-porn,

  hosts-file.net, hphosts-partial (always latest),

  ad_servers and grm.

  Be careful, this blocks a lot! Use only if you

  know how to use the whitelist. You have been warned!

  Filesize: ~24.5 MB, ~766'000 blocked hosts.



Set new type: [1-4 e=Exit]

Podemos ver una pequeña descripción de los ficheros que contienen cada una de las opciones, selecciona la que mejor se adapte a tus necesidades.

En la cabecera puedes ver los hots bloquedos en total (t), bloqueos semanales (w) y los nuevos bloqueos desde la ultima vez que ejecutamos diversion (n)

Diversion 4.0.3                  by thelonelycoder

RT-AC68U (armv7l) FW-384.7 @ 192.168.1.1

56,269  blocked domains  1  hosts file(s) in use
18,221 t  18,221 w  2,023 n ads since Oct 19 17:20

Como ves, tiene muchas opciones, puedes cambiar los colores, instalar Entware, crear una partición swap, en fin, lo mejor es que te entretengas un rato viendo todas las opciones.

Espero que te haya gustado, pasa un buen día.