Commit graph

1508 commits

Author SHA1 Message Date
rmceoin
e9324f8316 Use double brackets for the test. 2015-06-19 17:54:12 -07:00
rmceoin
b7e2c8053b Add local-ttl to dnsmasq config so that queries are cached by the requesting device. 2015-06-19 14:10:48 -07:00
rmceoin
67aba8c496 If exists, import a config file to allow for overriding script variables. 2015-06-19 13:31:51 -07:00
jacobsalmela
a2350ba880 misspelled "install" 2015-06-16 17:23:48 -05:00
jacobsalmela
9855041a57 Merge branch 'hostsformat' 2015-06-16 17:01:55 -05:00
jacobsalmela
fd2b24f2a0 preparing files for merge and for testing automated install
I haven't merged anything before, so hopefully, I won't mess it up too
bad!
2015-06-16 11:15:15 -05:00
jacobsalmela
655a584941 Updated README to reflect changes 2015-06-13 22:26:19 -05:00
jacobsalmela
e8b33ec8ee Automated installer test 2015-06-13 22:14:21 -05:00
jacobsalmela
294cf6d595 Removing since not using IPv6 right now 2015-06-13 22:13:59 -05:00
jacobsalmela
9d5a7531ca Testing script for a mini LCD
This script is for use with an Adafruit LCD so that you can peek at the
domains as they are blocked in real time.  It's not necessary for the
Pi-hole to function, but something fun I am working on.  There will be
a video in the next article I post.
2015-06-13 22:04:30 -05:00
jacobsalmela
e6b17ae8e9 Removing IPv6 support for now
I'm not fully up on my IPv6, and using the loopback doesn't work for
clients anyway as described in the latest commit to gravity.sh
2015-06-13 22:02:17 -05:00
jacobsalmela
01ac3c1dd3 Ditching the use of the loopback
Pushing files so they are available when the new article gets posted.

If the Pi's loopback is set in the hosts file, clients using it as a
DNS server will try to connect to their own loopback, which does not
have a Web server.  So the real IP of the Pi is used.  It is
recommended to use a static IP since this will be acting as a server.

Made one small change from some hard coded values to a variable.
2015-06-13 22:01:12 -05:00
jacobsalmela
c563841714 changing the origin folder
Originally, I had this set to /run/shm (in RAM) but ran into errors
when the list reached 900,000 entries.
Then I moved it to /tmp.
Finally, I decided to just put the files in the pihole dir so they are
available after reboots.  This will help with only downloading the
lists when absolutely needed--respecting the bandwidth of the people
serving the lists.

It is also possible to add addn-hosts=/path/to/hosts.conf within the
dnsmasq.conf file if you don't want to use hosts.  For simplicity and
speed, I just use the regular hosts file.
2015-06-06 23:34:32 -05:00
jacobsalmela
7290f7f950 Multiple gif files to choose from
25Bytes is the smallest, but can sometimes display weird on different
browser/systems.  Pick the one that works the best for you.
2015-06-06 23:29:54 -05:00
jacobsalmela
68ff6b02f9 listening on IPv6, too
Removed server=127.0.0.1 because it listens there by default
2015-06-06 23:29:13 -05:00
jacobsalmela
857c1e6edf new index to display tiny gif
The GIF is only 25 Bytes.

Thanks to http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
2015-06-06 23:28:41 -05:00
jacobsalmela
1637e9fe58 Enabling IPv6 on the Pi itself 2015-06-06 23:27:57 -05:00
jacobsalmela
1ef3ab5af8 very similar lighttpd conf 2015-06-06 23:27:43 -05:00
jacobsalmela
7ed49b07cf Enabling IPv6 2015-06-06 23:27:10 -05:00
jacobsalmela
457b70f5c5 add IPv6 support in the hosts file
Still need to get lighted to use IPv6.  I am doing this because some
ads can get through using IPv6 if the IPv4 version is blocked.  Also,
it seems to work fine as far as performance even though it doubles the
file size...

Also added a few comments for better documentation.
2015-06-04 08:21:44 -05:00
jacobsalmela
61c99ff145 forgot to change origin dir 2015-05-19 13:32:37 -05:00
jacobsalmela
56c776af22 hosts format script 2015-05-19 13:31:37 -05:00
mospaeda
942bdd2b35 Merge pull request #3 from jacobsalmela/master
Rebase
2015-03-29 20:18:40 +02:00
Jacob Salmela
15c84db022 Merge pull request #9 from mospaeda/master
Add a local blacklist file
2015-03-29 12:55:34 -05:00
Jacob Salmela
33692df4a9 featured on tech blogs 2015-03-27 19:20:39 -05:00
mospaeda
a11fe15d1b Automatic detection via hostname command 2015-03-23 19:47:35 +01:00
mospaeda
5d37b59768 Blacklist and automatic detection of IP address
detection is valid for all languages
2015-03-23 19:43:13 +01:00
mospaeda
89556f2480 Merge pull request #2 from jacobsalmela/master
Giving the README some much needed love
2015-03-21 00:31:29 +01:00
mospaeda
6edd8a828d Merge pull request #1 from mospaeda/mospaeda-patch-1
Automatic IP detection with all locale
2015-03-21 00:07:58 +01:00
mospaeda
d586ba3126 Automatic IP detection with all locale 2015-03-21 00:00:09 +01:00
mospaeda
7809ee386e Update gravity-adv.sh 2015-03-20 23:37:04 +01:00
Jacob Salmela
0ae8168351 Giving the README some much needed love 2015-03-20 12:50:49 -05:00
Mospaeda
185969b137 Update gravity-adv.sh
Add a local blacklist file
2015-03-19 23:09:36 +01:00
Mospaeda
5f3cb2e569 Update gravity-adv.sh 2015-03-19 22:59:55 +01:00
jacobsalmela
a8874fb606 Fixes #6 whitelist not found when using sudo
This fixes #6 by changing the location of the whitelist.txt file.
Instead of storing it in the current users home folder, it should be
created in /etc/pihole.  The script will also create the directory if
it does not exist, but will not add a whitelist.txt by default.  You
would still need to go back and manually add one.  But this directory
will be used to store other support files as the script improves.

I also added sudo commands to the commands requiring elevation.

Finally, changed the comment to reflect a more accurate number of
domains getting blocked.
2015-03-10 12:27:57 -05:00
jacobsalmela
b5cf6de4a3 Fixes issue #2 whitelist support
Just put a file named whitelist.txt in your home folder.  This file
should contain one domain per line that needs to be whitelisted.  If
the file does not exists, the script will continue as normal.
2015-02-22 17:54:03 -06:00
jacobsalmela
e1d79ffb0a 1x1 png for ads instead of blank space
http://jacobsalmela.com/raspberry-pi-ad-blocker-advanced-setup/#comment-
1859336435

Instead of serving up a blank Webpage, a small image will be displayed,
which should improve and eliminate any of the empty boxes where ads
used to be.
2015-02-18 08:25:31 -06:00
jacobsalmela
47baa1a6fd Removes more duplicates that uniq could not find
http://jacobsalmela.com/raspberry-pi-ad-blocker-advanced-setup/#comment-
1860675175

Thanks to napgravy for figuring this out.  It seems the DOS-style
line-endings that prevented uniq from getting rid of them.  This
reduces the ad domains from ~140,000 to around ~120,000 but it is much
more accurate.
2015-02-17 16:10:28 -06:00
jacobsalmela
b7573a533a Now blocks over 140,000 ad domains
In addition to the extra domains, there are numerous performance
improvements so the script runs faster.  There were also some
extraneous domains that were either blank or had some special
characters that needed to be removed.

Since the ad lists are not under my control, the end of the script will
now tell you how many domains will be blocked.  In case the sources it
pulls from ever update, you can run this script again and see the
difference.
2015-02-17 13:52:54 -06:00
jacobsalmela
fe4e579005 working copy (I think)
for use with the upcoming Raspberry Pi, ad-blocking, wireless router.
2015-02-08 17:17:45 -06:00
jacobsalmela
eb4d2382cd oops im a n00b 2015-02-08 17:06:43 -06:00
jacobsalmela
b7e6c4ec28 comment 2015-02-08 17:03:34 -06:00
jacobsalmela
32246e2e15 using loopback 2015-02-08 16:58:47 -06:00
Jacob Salmela
a2575dabf0 Merge pull request #1 from dwin999/master
90% speed improvement thanks to dwin999.
2015-01-24 21:33:00 -06:00
dwin999
1fd32687e6 Update gravity-adv.sh
This works much faster.
2015-01-25 01:11:28 +00:00
jacobsalmela
55ebc0e492 fixing dns 2014-12-20 13:10:58 -06:00
jacobsalmela
ebeb25d4ae initial commit 2014-12-20 13:09:52 -06:00
jacobsalmela
ea5616d3b3 escaping ascii art 2014-12-20 12:44:36 -06:00
jacobsalmela
4ba3ba2ef5 initial commit - unstable 2014-12-20 12:43:10 -06:00
jacobsalmela
925e8630ca initial commit 2014-12-20 12:41:36 -06:00