Skip to content

Instantly share code, notes, and snippets.

@satmandu
Last active January 10, 2021 13:12
Show Gist options
  • Save satmandu/e6ba526505a6a0a12407eb73d95987f2 to your computer and use it in GitHub Desktop.
Save satmandu/e6ba526505a6a0a12407eb73d95987f2 to your computer and use it in GitHub Desktop.
PfSense script to keep HE tunnels from confusing netflix by blocking netflix IPV6 resolution.
#!/bin/sh
#make sure the directory for the python libraries is in the chroot
mkdir -p /var/unbound/usr/local/lib/python2.7
#link the actual python library directory to the chroot's directory
mount -t nullfs /usr/local/lib/python2.7 /var/unbound/usr/local/lib/python2.7
#copy the python script to the /var/unbound directory so
#unbound-checkconf can find it
# This script is originally from https://gist.github.com/FiloSottile/e2cffde2bae1ea0c14eada229543aebd/
cp /root/netflix-no-aaaa.py /var/unbound/
cp /root/netflix-no-aaaa.py /var/unbound/var/unbound/
#create a /var/unbound directory in the /var/unbound directory so that
#unbound can find the script
mkdir -p /var/unbound/var/unbound
@satmandu
Copy link
Author

satmandu commented Jun 5, 2018

I'm also using the shellcmd plugin as follows to both run the script and enable the python module in unbound.conf and reload the unbound configuration:

/root/netflix-dns.sh earlyshellcmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment