Skip to content

Block ads via DNS/Bind 9 in linux/windows by adding empty zones using perl script.

Notifications You must be signed in to change notification settings

piengeng/blockads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockads.pl

This is a perl script I'd created for personal usage to block annoying ads and malicious sites, use at your own risk.

Requirements:

  • Linux/Windows with perl, wget, bind9 installed. Refer lin or win to learn how-to.
  • Know how to read/modify perl scripts in case installation differences.
  • optional crontab edits if you want to run this script periodically.

Assume:

bind9 installed to /etc/bind or C:\named , or else modifications to the script is needed.

modify named.conf if you know how/like.

windows note:

  • privileged command line :
  • find rndc-confgen.exe from existing installer, run rndc-confgen -a, a rndc.key will auto-generated to C:\named\etc
  • rndc-confgen > C:\named\etc\rndc.conf
  • copy blockads/config/only4win/* to C:\named\etc is needed. Not needed for linux.

Run the script with privileged access:

perl ./blockads.pl in linux, or perl blockads.pl in windows.

/etc/init.d/bind9 restart or WIN+R > services.msc, find "ISC BIND" and restart.

Enjoy almost ad-free paid internet!

About

Block ads via DNS/Bind 9 in linux/windows by adding empty zones using perl script.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published