« Mikrotik : Blacklist par Pays » : différence entre les versions
De www.yakakliker.org
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 38 : | Ligne 38 : | ||
[[Catégorie:Reseau]] | [[Catégorie:Reseau]] | ||
[[Catégorie:Securite]] | [[Catégorie:Securite]] | ||
<html> | <html> | ||
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script> | <script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script> | ||
Ligne 48 : | Ligne 50 : | ||
}); | }); | ||
</script> | </script> | ||
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a> | |||
</html> | </html> |
Dernière version du 19 février 2025 à 15:02
Les Scripts
# Script de telechargement de la liste AFGHANISTAN (AF)
/system script add name="Downloadaf-aggregated" source={
/tool fetch url="http://blacklist.yakakliker.org/af-aggregated.rsc" mode=http;
:log info "af-aggregated.rsc telecharge depuis http://blacklist.yakakliker.org";
}
# Script suppression de l'ancienne liste AFGHANISTAN (AF) et ajout de la nouvelle
/system script add name="Replaceaf-aggregated" source={
/ip firewall address-list remove [find where comment="af-aggregated"]
/import file-name=af-aggregated.rsc;
:log info "Suppression de l'ancienne liste AFGHANISTAN (AF) et import de la nouvelle liste";
}
La tâche planifiée
# Planification du telechargement et de l'import de la liste AFGHANISTAN (AF)
/system scheduler add comment="Telechargement AFGHANISTAN (AF) liste" interval=7d name="Downloadaf-aggregated_List" on-event=Downloadaf-aggregated start-date=jan/01/1970 start-time=04:00:00
/system scheduler add comment="Import AFGHANISTAN (AF) Liste" interval=7d name="Installaf-aggregated_List" on-event=Replaceaf-aggregated start-date=jan/01/1970 start-time=04:15:00
Les règles de Firewall
/ip firewall raw add action=drop chain=prerouting comment="Blacklist AFGHANISTAN (AF)" log=yes src-address-list=af-aggregated
/ip firewall filter add action=drop chain=forward comment="Blacklist AFGHANISTAN (AF)" dst-address-list=af-aggregated log=yes log-prefix=AFGHANISTAN_
Liens
https://www.ipdeny.com/ipblocks/