In addition to the base script (which was recently updated) I’ve added the following to block anything related to facebook.
# Block FB
for ip in `whois -h whois.radb.net '!gAS32934' | grep /`
echo $ip >> $tmpdir/fb
No need for the loop:
whois -h whois.radb.net '!gAS32934' | grep / | tr ' ' '\n' >> $tmpdir/fb
Thanks. Unfortunately I had to tone this down a touch as in addition to blocking facebook and instagram, it blocks whatsapp and this was seen as a step too far by members of my household.