User Tools

Site Tools


routeros

Balance

OSPF watchdog when default route vanishes, set your variables!

:local HOSTNAME ([/system identity get name])
:if ([/ip route print count-only where dst-address=0.0.0.0/0 ospf]=0) do={
 /routing ospf instance set 0 disabled=yes
 /routing ospf instance set 0 disabled=no
 /log error "$HOSTNAME NO OSPF"
 :delay 4000ms;
 /tool fetch url="https://api.telegram.org/bot$BOT_ID/sendMessage?chat_id=$CHAT_ID&text=$HOSTNAME NO OSPF, OSPF RESTARTING" keep-result=no
}

Dirty block x.com with address-list (more granularity, takes more resources, make your own drop rules)

ip firewall address-list add list=x.com address=69.195.185.0/24 comment=x.com
ip firewall address-list add list=x.com address=192.133.76.0/22 comment=x.com
ip firewall address-list add list=x.com address=69.195.187.0/24 comment=x.com
ip firewall address-list add list=x.com address=199.16.156.0/23 comment=x.com
ip firewall address-list add list=x.com address=104.244.45.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.196.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.184.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.178.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.169.0/24 comment=x.com
ip firewall address-list add list=x.com address=103.252.114.0/23 comment=x.com
ip firewall address-list add list=x.com address=104.244.41.0/24 comment=x.com
ip firewall address-list add list=x.com address=202.160.131.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.162.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.194.0/24 comment=x.com
ip firewall address-list add list=x.com address=104.244.47.0/24 comment=x.com
ip firewall address-list add list=x.com address=103.252.112.0/23 comment=x.com
ip firewall address-list add list=x.com address=202.160.130.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.180.0/24 comment=x.com
ip firewall address-list add list=x.com address=104.244.40.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.181.0/24 comment=x.com
ip firewall address-list add list=x.com address=202.160.128.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.199.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.179.0/24 comment=x.com
ip firewall address-list add list=x.com address=199.16.156.0/22 comment=x.com
ip firewall address-list add list=x.com address=104.244.46.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.168.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.182.0/24 comment=x.com
ip firewall address-list add list=x.com address=199.59.148.0/22 comment=x.com
ip firewall address-list add list=x.com address=64.63.0.0/18 comment=x.com
ip firewall address-list add list=x.com address=199.96.56.0/23 comment=x.com
ip firewall address-list add list=x.com address=69.195.175.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.174.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.192.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.160.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.166.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.198.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.183.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.195.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.171.0/24 comment=x.com
ip firewall address-list add list=x.com address=104.244.42.0/24 comment=x.com
ip firewall address-list add list=x.com address=202.160.129.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.160.0/19 comment=x.com
ip firewall address-list add list=x.com address=209.237.192.0/19 comment=x.com
ip firewall address-list add list=x.com address=104.244.44.0/24 comment=x.com
ip firewall address-list add list=x.com address=69.195.186.0/24 comment=x.com
ip firewall address-list add list=x.com address=209.237.193.0/24 comment=x.com
ip firewall address-list add list=x.com address=188.64.224.0/21 comment=x.com
ipv6 firewall address-list add list=x.com address=2400:6680:f000::/36 comment=x.com
ipv6 firewall address-list add list=x.com address=2a04:9d40:f000::/36 comment=x.com
ipv6 firewall address-list add list=x.com address=2606:1f80:f000::/36 comment=x.com

Dirty block x.com with blackhole routes (least resources used, no firewall needed, no options)

ip route add type=blackhole dst-address=69.195.185.0/24 comment=x.com
ip route add type=blackhole dst-address=192.133.76.0/22 comment=x.com
ip route add type=blackhole dst-address=69.195.187.0/24 comment=x.com
ip route add type=blackhole dst-address=199.16.156.0/23 comment=x.com
ip route add type=blackhole dst-address=104.244.45.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.196.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.184.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.178.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.169.0/24 comment=x.com
ip route add type=blackhole dst-address=103.252.114.0/23 comment=x.com
ip route add type=blackhole dst-address=104.244.41.0/24 comment=x.com
ip route add type=blackhole dst-address=202.160.131.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.162.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.194.0/24 comment=x.com
ip route add type=blackhole dst-address=104.244.47.0/24 comment=x.com
ip route add type=blackhole dst-address=103.252.112.0/23 comment=x.com
ip route add type=blackhole dst-address=202.160.130.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.180.0/24 comment=x.com
ip route add type=blackhole dst-address=104.244.40.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.181.0/24 comment=x.com
ip route add type=blackhole dst-address=202.160.128.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.199.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.179.0/24 comment=x.com
ip route add type=blackhole dst-address=199.16.156.0/22 comment=x.com
ip route add type=blackhole dst-address=104.244.46.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.168.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.182.0/24 comment=x.com
ip route add type=blackhole dst-address=199.59.148.0/22 comment=x.com
ip route add type=blackhole dst-address=64.63.0.0/18 comment=x.com
ip route add type=blackhole dst-address=199.96.56.0/23 comment=x.com
ip route add type=blackhole dst-address=69.195.175.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.174.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.192.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.160.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.166.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.198.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.183.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.195.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.171.0/24 comment=x.com
ip route add type=blackhole dst-address=104.244.42.0/24 comment=x.com
ip route add type=blackhole dst-address=202.160.129.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.160.0/19 comment=x.com
ip route add type=blackhole dst-address=209.237.192.0/19 comment=x.com
ip route add type=blackhole dst-address=104.244.44.0/24 comment=x.com
ip route add type=blackhole dst-address=69.195.186.0/24 comment=x.com
ip route add type=blackhole dst-address=209.237.193.0/24 comment=x.com
ip route add type=blackhole dst-address=188.64.224.0/21 comment=x.com
ipv6 route add type=unreachable dst-address=2400:6680:f000::/36 comment=x.com
ipv6 route add type=unreachable dst-address=2a04:9d40:f000::/36 comment=x.com
ipv6 route add type=unreachable dst-address=2606:1f80:f000::/36 comment=x.com
routeros.txt · Last modified: 2024/09/01 11:04 by protocol