Skip to content

Instantly share code, notes, and snippets.

@as
Created September 6, 2019 18:56
Show Gist options
  • Save as/bbea2025d5c0d8d3eb4e705f5e32aaa9 to your computer and use it in GitHub Desktop.
Save as/bbea2025d5c0d8d3eb4e705f5e32aaa9 to your computer and use it in GitHub Desktop.
block facebook, instagram, et. al,
# as 2019.09.06
# generate a list of iptables commands to block
# all ip addresses assigned to facebook via the
# organization's autonomous system number.
whois -h whois.radb.net '!gAS32934' | egrep / | tr ' ' '\n' | awk '{ printf "iptables -I OUTPUT -d %s -j REJECT\n",$1 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment