Skip to content

Instantly share code, notes, and snippets.

@jackhftang
Forked from frafra/dnsmasq-block-ads.sh
Last active June 26, 2016 02:59
Show Gist options
  • Save jackhftang/dd4783d7014eb0af97562d6ef2463306 to your computer and use it in GitHub Desktop.
Save jackhftang/dd4783d7014eb0af97562d6ef2463306 to your computer and use it in GitHub Desktop.
dnsmasq block ads
#!/bin/bash
FILE=/tmp/list
cat > $FILE <<-END
address=/2mdn.net/0.0.0.0
address=/360yield.com/0.0.0.0
address=/adgrx.com/0.0.0.0
address=/adnxs.com/0.0.0.0
address=/ads.yahoo.com/0.0.0.0
address=/adsrvr.com/0.0.0.0
address=/adsymptotic.com/0.0.0.0
address=/advertising.com/0.0.0.0
address=/adzerk.net/0.0.0.0
address=/afy11.com/0.0.0.0
address=/amazon-adsystem.com/0.0.0.0
address=/analytics.twitter.com/0.0.0.0
address=/atdmt.com/0.0.0.0
address=/bkrtx.com/0.0.0.0
address=/bluekai.com/0.0.0.0
address=/casalemedia.com/0.0.0.0
address=/chango.com/0.0.0.0
address=/chartbeat.com/0.0.0.0
address=/chartbeat.net/0.0.0.0
address=/connexity.net/0.0.0.0
address=/criteo.com/0.0.0.0
address=/crm4d.com/0.0.0.0
address=/datvantage.com/0.0.0.0
address=/doubleclick.net/0.0.0.0
address=/doubleverify.com/0.0.0.0
address=/easydmp.net/0.0.0.0
address=/eqads.com/0.0.0.0
address=/eyereturn.com/0.0.0.0
address=/google-analytics.com/0.0.0.0
address=/googleadservices.com/0.0.0.0
address=/googlesyndication.com/0.0.0.0
address=/googletagmanager.com/0.0.0.0
address=/googletagservices.com/0.0.0.0
address=/hs-analytics/0.0.0.0
address=/imrworldwide.com/0.0.0.0
address=/indexww.com/0.0.0.0
address=/inspectlet.com/0.0.0.0
address=/kinja-static.com/0.0.0.0
address=/krxd.com/0.0.0.0
address=/krxd.net/0.0.0.0
address=/kxcdn.com/0.0.0.0
address=/liverail.com/0.0.0.0
address=/lkqd.com/0.0.0.0
address=/marketo.com/0.0.0.0
address=/mathtag.com/0.0.0.0
address=/mktoresp.com/0.0.0.0
address=/mythings.com/0.0.0.0
address=/openx.net/0.0.0.0
address=/optimizely.com/0.0.0.0
address=/outbrain.com/0.0.0.0
address=/parsely.com/0.0.0.0
address=/perfectmarket.com/0.0.0.0
address=/pubmatic.com/0.0.0.0
address=/quantserve.com/0.0.0.0
address=/rfihub.com/0.0.0.0
address=/scorecardresearch.com/0.0.0.0
address=/sharethis.com/0.0.0.0
address=/simplereach.com/0.0.0.0
address=/simpli.fi/0.0.0.0
address=/sitescout.com/0.0.0.0
address=/skimresources.com/0.0.0.0
address=/smartadserver.com/0.0.0.0
address=/solution.weborama.fr/0.0.0.0
address=/sumome.com/0.0.0.0
address=/taboola.com/0.0.0.0
address=/turn.com/0.0.0.0
END
curl -s "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext" \
| sed 's;^\(.*\)$;address=/\1/0.0.0.0;' >> $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment