« Mikrotik : Blacklist par Pays » : différence entre les versions
De www.yakakliker.org
Aucun résumé des modifications |
|||
Ligne 38 : | Ligne 38 : | ||
[[Catégorie:Reseau]] | [[Catégorie:Reseau]] | ||
[[Catégorie:Securite]] | [[Catégorie:Securite]] | ||
<html> | |||
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script> | |||
<script> | |||
kofiWidgetOverlay.draw('yakakliker', { | |||
'type': 'floating-chat', | |||
'floating-chat.donateButton.text': 'Café', | |||
'floating-chat.donateButton.background-color': '#00b9fe', | |||
'floating-chat.donateButton.text-color': '#fff' | |||
}); | |||
</script> | |||
</html> |
Version du 21 janvier 2025 à 14:37
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_