Network

Block Facebook (TLS Host + RAW) โ€” v6 & v7

Learns Facebook and Facebook CDN addresses automatically from the TLS host name, keeps them in an address list for one day and drops them in the RAW table. Light on the CPU and needs no manual list updates.

MikroTik Version

RouterOS v6 & v7

/ip firewall raw
# EN: Learn main Facebook hosts | AR: ุชุนู„ู… ุนู†ุงูˆูŠู† ููŠุณุจูˆูƒ ุงู„ุฑุฆูŠุณูŠุฉ
add chain=prerouting protocol=tcp tls-host=*facebook* action=add-dst-to-address-list address-list=Facebook address-list-timeout=1d comment="Facebook - learn"
# EN: Learn the CDN hosts (images/videos) | AR: ุชุนู„ู… ุนู†ุงูˆูŠู† ุงู„ู€ CDN (ุงู„ุตูˆุฑ ูˆุงู„ููŠุฏูŠูˆ)
add chain=prerouting protocol=tcp tls-host=*fbcdn* action=add-dst-to-address-list address-list=Facebook address-list-timeout=1d comment="Facebook CDN - learn"
# EN: Drop traffic to the learned addresses | AR: ุญุธุฑ ุงู„ุชุฑุงููŠูƒ ุฅู„ู‰ ุงู„ุนู†ุงูˆูŠู† ุงู„ู…ุชุนู„ูŽู‘ู…ุฉ
add chain=prerouting dst-address-list=Facebook action=drop comment="Facebook - drop"