Commit Graph

708 Commits

Author SHA1 Message Date
nate a9c24b456d Bug fixes and logging improvements
Finalized for production deployment. Next release targeting a tarball of config files plus additional logging.
2016-03-25 19:04:03 -05:00
nate b4463bf42c Added test for nslookup
Checks the TESTURL for nslookup is not whitelisted
2016-03-25 16:42:17 -05:00
nate 8f8dc66c70 Ignore whitespace when writing config files 2016-03-24 18:50:53 -05:00
Nate b746250e71 Made all advanced/Scripts/ executable for consistency. 2016-03-24 18:29:13 -05:00
Promofaux bc09760c84 Grab changes by @rosskevin. (#386 - lighttpd changes to handle JS files) 2016-03-24 23:19:44 +00:00
nate 86eafe7a33 Added comparison of gravity.list with Whitelist.txt and Blacklist.txt.
Added additional echos to help read the debug file.
TODO: testNslookup function
2016-03-24 16:21:29 -05:00
nate 04638c9065 Added 01-pihole.conf from /etc/dnsmasq.d/ to log
Write 01-pihole.conf to debug log
2016-03-20 18:21:35 -05:00
nate b0dd231018 Modified description in header
Removed copied header description from piholeLogFlush.sh and replaced with relevant description.
2016-03-19 21:34:02 -05:00
nate 0b5f005a5d Added piholeDebug.sh script for advanced debugging
Script piholeDebug.sh added to /usr/local/bin to generate a detailed log file for debugging/troubleshooting.
2016-03-19 20:32:11 -05:00
Kevin Ross b79db36336 no need for the X- header prefix in the string 2016-03-14 22:59:38 -05:00
Kevin Ross d3971b26e4 add a valid js stub 2016-03-14 22:52:02 -05:00
Kevin Ross a44a201f00 rewrite js files to a valid stub 2016-03-14 22:51:16 -05:00
Morlok8k d13ae0610e fix for older versions of uptime, on development branch. 2016-03-08 10:19:01 -08:00
Carter Maxwell ced0ae0d65 remove trailing whitespace whitelist.sh 2016-03-05 21:15:53 -08:00
Carter Maxwell 876c51302a remove trailing whitespace updateDashboard.sh 2016-03-05 21:15:36 -08:00
Carter Maxwell a6877e7c13 remove trailing whitespace chronometer.sh 2016-03-05 21:15:11 -08:00
Carter Maxwell f633d1fa5b remove trailing whitespace blacklist.sh 2016-03-05 21:14:56 -08:00
Carter Maxwell 4f90b41343 remove trailing whitespace dnsmasq.conf.original 2016-03-05 21:14:17 -08:00
Adam Warner 3a46e7fc0a Merge pull request #338 from pi-hole/auto-chronometer-lcd-setup
Auto chronometer lcd setup
2016-02-21 20:48:46 +00:00
jacobsalmela c5d45edf2d consoleblank=0
This makes sure the LCD screen does not go blank after a set period of
time.
2016-02-20 01:15:14 -06:00
jacobsalmela 0116b6341c updated script
Added links to where code was borrowed from
added reboot at the end
also added a few things commented out that might be useful for some
people to learn.
2016-02-20 01:14:48 -06:00
jacobsalmela f0e5b2b6f9 Merge branch 'master' into auto-chronometer-lcd-setup 2016-02-18 16:45:47 -06:00
Hippyjake 21c688a8a8 add uptime -p to chrono script 2016-02-16 18:06:49 -07:00
jacobsalmela 3142992c57 update 2016-02-14 10:53:13 -06:00
Promofaux 4c24186911 Fixes divide by zero error. 2016-02-14 02:58:09 +00:00
Promofaux 70e4104c17 Merge remote-tracking branch 'origin/development' 2016-01-31 20:47:10 +00:00
Mcat12 48f9a61ff0 Updated License 2016-01-30 15:12:40 -05:00
Chad Howell abef758ff6 Get ready for user selected DNSs
Prep for using sed to insert user selected DNSs into 01-pihole.conf.
Selections will come from dialog during install script containing the
following choices: Google, DynDNS, and eventually 2 custom DNS servers.
2016-01-25 00:05:17 -05:00
Chad Howell e5f9663a0e Move dnsmasq.conf to dnsmasq.d/01-pihole.conf
Check if /etc/dnsmasq.conf is from pihole.  If so, replace with an
original and install new in .d directory.  Add and unmolested version of
dnsmasq.conf to the ./advanced directory.
2016-01-25 00:04:02 -05:00
Chad Howell ff5ed561cc Rename dnsmasq.conf to 01-pihole.conf
Rename dnsmasq.conf to 01-pihole.conf to prepare for move to
/etc/dnsmasq.d/ per the normal way of modding configs on Debian based
systems.
2016-01-24 23:54:00 -05:00
Promofaux 754beed3a1 Bring up to date with master 2016-01-24 20:22:41 +00:00
Promofaux 8ecf8eb76c output to match other scripts 2016-01-24 17:18:37 +00:00
Promofaux 3cd1a5b1d5 ... Helps if I add the changes to the repo file, and not the test file on my pi. 2016-01-24 16:51:54 +00:00
Promofaux dfcf9d133e Make output make a bit more sense 2016-01-24 16:46:00 +00:00
jacobsalmela 71fd32b1f4 script to set everything up 2016-01-23 12:56:27 -06:00
jacobsalmela fcf3b4e4e2 file to set lcd font size 2016-01-23 11:48:12 -06:00
Dan Schaper 1e735c26c4 Repo Change QuickFix
QuickFix for Repo location change.
2016-01-22 20:46:10 -08:00
Dan Schaper 494fcd60ab Merge branch 'development' of https://github.com/jacobsalmela/pi-hole into development 2016-01-20 05:25:49 +00:00
Mcat12 544919175c Added back in debugging response header 2016-01-20 05:23:30 +00:00
Mcat12 ede8f4714f Removed extra http redirect 2016-01-20 05:23:15 +00:00
Promofaux af982a02af Move call to CheckIPv6 function into CalcBlockedDomains, rather than relying on remembering to call it before you call CalcBlockedDomains. 2016-01-19 21:14:01 +00:00
Jacob Salmela 9ba38e668a Merge pull request #193 from PromoFaux/Chronometer
Major overhaul of chronometer script
2016-01-18 17:36:33 -06:00
Adam Warner f665899116 Update chronometer.sh
weirdness
2016-01-18 23:35:21 +00:00
Adam Warner de464e17cc Update chronometer.sh
Note to self, Find&Replace>Replace All is a bad idea.
2016-01-18 22:24:02 +00:00
Adam Warner 0eed56380d Update chronometer.sh
What, me? Reference the wrong file?
2016-01-18 22:15:39 +00:00
Promofaux 487c26db44 Major overhaul. Added -j option to output stats as JSON formatted string. If run with no option, then chronometer runs as normal. Fixed calculations to match those on the web dashboard. 2016-01-18 22:03:53 +00:00
Jacob Salmela d77399727c Merge pull request #189 from jacobsalmela/whitelist
Switched CRLF to LF (DOS to UNIX)
2016-01-17 18:34:02 -06:00
Promofaux 414ef54cfe Switched CRLF to LF (DOS to UNIX) 2016-01-17 14:09:06 +00:00
jacobsalmela 5d608a2db5 leave system cron alone
Taking JoshKastang’s idea from #153, the system cron file will be left
alone and the pihole.cron gets its own.
2016-01-16 13:48:29 -06:00
jacobsalmela bd5ed2bcf0 move webinterface.sh into scripts folder
I also renamed it to make it is easier to identify.
2016-01-16 13:12:55 -06:00
Promofaux f9a2ca5c32 Tidy up help text on both scripts. Add quiet help. 2016-01-16 00:47:45 +00:00
Adam Warner 2b0bee085b Incorrect reference to whitelist in the blacklist.sh comments :) 2016-01-15 18:57:20 +00:00
Adam Warner 5d842a7533 Merging 2016-01-15 18:45:12 +00:00
Adam Warner f68cf10efa Tidied up a couple of things 2016-01-15 15:54:00 +00:00
Adam Warner 89e3c25a90 Behaves like whitelist, but on the blacklist 2016-01-15 15:53:40 +00:00
Adam Warner 14ee4850af Placeholder for blacklist script 2016-01-15 14:50:13 +00:00
Adam Warner 534dbc9b6e added a quiet option for when the script is called by gravity. Less output = less confusion! 2016-01-15 14:48:07 +00:00
Adam Warner 8ad116fe7b Aiming to get whitelist.sh to run either standalone or to be called from gravity.sh. Initial commit 2016-01-15 14:17:55 +00:00
jacobsalmela ca5e34a9a9 Merge branch 'master' into whitelist
# Conflicts:
#	gravity.sh
2016-01-14 18:12:45 -06:00
Jacob Salmela 4b1dd8a2a5 fixes #158
Running at midnight, not 11:58 in the afternoon.
2016-01-12 17:44:08 -06:00
Jacob Salmela 57282cfe16 ugly hack to whitelist from the Web interface
I wanted the whitelist feature to keep the user on the same page
without having to reload it.  I'm sure someone better versed in PHP
could eliminate the need for this hack.  Nonetheless, it works.

www-data runs the script if executed from the Web interface.  www-data
also needs access to write to /etc/pihole/gravity.list to actually
remove the domain.  So a few more things need to happen before this
will fully work.

The changes in this script won't change what is displayed if run from
the terminal, but will help when it needs to be run from the Web
interface, so I am just committing this now.

The only other thing I would like to see would be a progress spinner,
but my Web skills still need some work...
2015-12-09 15:16:34 -06:00
Dan Schaper d215fa9ade Resolve merge confict 2015-12-06 20:22:34 -08:00
Dan Schaper cb91b8f5fa Add copyright headers 2015-12-06 05:55:50 -08:00
Jacob Salmela f453d407a9 log-async
For better performance.  I have been using it for a few weeks with no
adverse effects.
2015-12-05 14:14:34 -06:00
Jacob Salmela 49a40115c8 fixes #105 2015-12-05 14:04:37 -06:00
Dan Schaper 2193d6a81f Document dnsmasq.conf config 2015-12-03 01:29:26 -08:00
Jacob Salmela c34cc1608b for use with logstalgia
This seems to show the domain queried and the path requested.
2015-12-01 16:04:07 -06:00
Jacob Salmela 1eb7f879f0 fixes #101
the line url.access-deny caused the error.
2015-12-01 15:12:16 -06:00
Jacob Salmela 831322b8b2 replace file paths with variables 2015-11-27 18:38:33 -06:00
Jacob Salmela 573c1ef94f double bracket notation 2015-11-27 18:34:02 -06:00
Jacob Salmela a2cddda590 if whitelist.txt doesn't exist, create it 2015-11-27 18:29:44 -06:00
Jacob Salmela ce0ca3cc61 for use with /etc/crontab
Adding a system-wide crontab to update the ad source lists, flush the
log daily, and (eventually) record the stats for historical purposes.
2015-11-07 07:58:35 -06:00
Jacob Salmela a675dc3f2c Merge pull request #68 from dschaper/hawson-reduce-memory
Hawson reduce memory
2015-11-06 16:50:37 -06:00
Jacob Salmela 1b51b9ade3 for use as a cron job
The log will be flushed daily and stats will be stored in a DB for
displaying on the Web interface.
2015-11-05 14:31:38 -06:00
Jacob Salmela 271163ed66 Merge pull request #61 from nathanpjones/improve-whitelist-script
Improve whitelisting script
2015-11-04 20:35:42 -06:00
Jacob Salmela 2f9e650739 Merge pull request #62 from jacobsalmela/lighttpd
New lighttpd.conf.  Closes #31 and #50
2015-10-27 17:26:45 -05:00
Nathan Jones deb48c124f Improve whitelisting script
Match domain exactly instead of partially.
Gather list of domains to minimize number of times that hosts file must be enumerated.
Only add domain to whitelist if it isn't already present.
2015-10-25 16:53:20 -07:00
Jacob Salmela 17904b3106 ads still get blocked when a 404 happens 2015-10-17 12:12:51 -05:00
Jacob Salmela 7b16a42f31 conditionals for accessing the web interface
This adds in some back end improvements for better debugging.  It also
allows you to access the Web interface, while you are connected to the
Pi-hole, which resolves #31
2015-10-17 12:11:03 -05:00
Jacob Salmela 28dd956449 changing web server root folder
Since the version of lighted in Jessie moved the default folder to
/var/www/html, I am going to make it the same for wheezy for better
compatibility.

Also removed spaces
2015-10-17 12:04:49 -05:00
Jacob Salmela bf397db73e adding crontab file
I plan to use this to be deployed with the automatic installer.  Just
pushing the file for now so I can test download it.
2015-10-15 18:58:12 -05:00
jacobsalmela d68c262b96 swap file to eliminate memory allocation error 2015-08-24 16:30:00 -05:00
Fourdee 52ef76d717 missed a few more /etc/host changes 2015-07-30 18:10:26 +01:00
Dan 024395b73b Update chronometer.sh
Missed a change todaysAdsEliminated to /\/etc\/pihole\/gravity.list/
2015-07-30 18:01:10 +01:00
Fourdee 9d99a4ef36 Patch 3 - Dont use /etc/hosts
/etc/pihole/gravity.list now stores the block list. Ensures the
/etc/hosts file is left untouched.
2015-07-30 17:24:24 +01:00
Jacob Salmela 2d96f005e6 Merge pull request #28 from Fourdee/patch-2
Adjusting chronomiter.sh to use the new /var/log/pihole.log
2015-07-29 18:02:29 -05:00
Dan 9627b27f15 pihole logfile changes
https://github.com/jacobsalmela/pi-hole/pull/27
2015-07-29 12:22:28 +01:00
Dan 9230be63d5 .log extension 2015-07-29 12:20:39 +01:00
Dan e20f948e49 Log PiHole dns stats to /var/log/pihole
Log PiHole dns stats to /var/log/pihole
Removes the requirement for rsyslog and reading the shared logfile /var/log/daemon.log
2015-07-28 19:34:36 +01:00
jacobsalmela 11614263b8 better version of LCD display stats 2015-07-25 13:05:13 -05:00
jacobsalmela 9a2862de62 closes #24 whitelist without running gravity.sh
It's pretty slow because /etc/hosts is so large, but it works.  You can
add any number of domains as arguments and it will search for and
remove each one.

Maybe someone smarter knows how to make it faster...
2015-07-18 09:39:18 -05: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
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 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 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 56c776af22 hosts format script 2015-05-19 13:31:37 -05:00
jacobsalmela ebeb25d4ae initial commit 2014-12-20 13:09:52 -06:00
jacobsalmela 925e8630ca initial commit 2014-12-20 12:41:36 -06:00
jacobsalmela 60cc27a978 file for automated install 2014-12-20 12:23:33 -06:00
jacobsalmela 72209cbac0 file for automated install 2014-12-20 12:22:30 -06:00