paulgorman.org

< ^ txt

Fri Aug 26 08:02:37 EDT 2016 Slept from around 11:30 to seven. Woke briefly around five. High of eighty-six today. Partly sunny. Goals: Work: - Check if Danny has approved Office PO yet Done. Not yet approved. - Test dns blocking Done. Looks like it will work well. Fifteen minute walk at lunch. Nice day out. Saw a dragonfly, a crow, and one of those black flying grasshoppers. Home: - Call police guy back Done. Lt. Bargas wasn't in, but I spoke to Detective Tom Danielsson. He said I don't need to do anything, and the car will be sold eventually. I should get a letter about it at some point. - Get back to Ed about this weekend Done. - Buy a flashlight for the car? - Set up Unbound on blinky Done. Took another fifteen minute walk after work. Saw a morning dove. Take a file containing a list off domain names (and some comments prepended with "#"), and output lines like `local-zone: "example.com" refuse`: % awk '{if(substr($1, 0, 1) != "#") print "local-zone: \""$1"\" refuse"}' /tmp/blacklist.acl > /var/unbound/conf.d/blacklist.conf or: % cat blacklist.acl | perl -ne 'chomp; print "local-zone: \"$_\" refuse\n" if $_ =~ /^[a-zA-Z0-9\.\-\_]+\.[a-zA-Z0-9]{2,}$/' > blacklist.conf Shell script to update domains blocked by Unbound (assuming we've included the blacklist-*.conf files in our unbound.conf): #!/bin/sh curl --silent --user username:************** --output /tmp/dg-ads.tar.gz http://www.squidblacklist.org/downloads/squidblacklists/dg/dg-ads.tar.gz curl --silent --user username:************** --output /tmp/dg-malicious.tar.gz http://www.squidblacklist.org/downloads/squidblacklists/dg/dg-malicious.tar.gz if [ -s /tmp/dg-ads.tar.gz ] then cd /tmp tar -xvf /tmp/dg-ads.tar.gz awk '{if(substr($1, 0, 1) != "#") print "local-zone: \""$1"\" refuse"}' /tmp/dg-ads.acl > /var/unbound/conf.d/blacklist-ads.conf fi if [ -s /tmp/dg-malicious.tar.gz ] then cd /tmp tar -xvf /tmp/dg-malicious.tar.gz awk '{if(substr($1, 0, 1) != "#") print "local-zone: \""$1"\" refuse"}' /tmp/dg-malicious.acl > /var/unbound/conf.d/blacklist-malicious.conf fi unbound-control reload Bloop: % split -d --suffix-length=3 --additional-suffix=.conf --lines=10000 blacklist-malicious.conf blacklist-malicious. Breakfast: coffee with half-and-half, spinach, a spoonful of yogurt, an apple fritter Lunch: Thai curry noodles Dinner: Little Caesar's pizza

< ^ txt