Stuart Cardall
54c6ba7438
add /sbin to binary search paths
...
* Amazon Linux puts pidof under /sbin
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/399
2020-09-06 20:51:57 +00:00
Alexander Leidinger
38281f1185
Add *BSD compatibility (use GNU sed).
2020-02-15 13:46:07 +01:00
Stuart Cardall
13ad4132f9
add warning for missing dig binary
...
* skip whitelisting public ip if dig binary is unavailable
* fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/346
2020-02-06 21:01:09 +00:00
Stuart Cardall
e8b045c2b1
Merge pull request #341 from mitchellkrogza/alpine
...
add -z option to disable vhost configuration
2020-01-28 14:20:56 +00:00
Stuart Cardall
e7382c264d
add option to disable vhost configuration
...
* adds -z option to disable configuration in automated environments (e.g ansible)
fixes:
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/286
2020-01-28 13:46:58 +00:00
Stuart Cardall
012f8e00de
remove hardcoded vhost extension in check_config() message
...
fixes:
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/327
2020-01-28 11:07:30 +00:00
Mitchell Krog
61c0d865f0
[MASTER] change way we lookup local IP
2019-12-16 17:56:03 +02:00
Mitchell Krog
9ec733ab72
Change the way we lookup local IP - setupngxblocker
2019-12-16 16:55:59 +02:00
danieli
bc2765a472
fix OR conditions in find_vhosts(), fixes, #313
...
just "parenthesize" conditions
2019-09-10 11:19:55 +02:00
apterix
b1fa069a72
find symbolic links too
2019-09-05 11:07:21 -03:00
Mitchell Krog
7fc8ef5611
[MASTER] FIX (sed) check_nginx_directives()
...
Fixes : #287 Closes : #287
2019-07-31 14:23:24 +02:00
Mitchell Krog
08fce8e496
Improve check_wildcard() regex
...
Was detecting a commented out #/etc/nginx/conf.d/* as existing and therefore not doing required blocker includes
2019-07-03 15:25:20 +02:00
Mitchell Krog
2d559b3842
NEW distro friendly setup-ngxblocker
...
Includes now inserted into better position in nginx.conf. This now stops the includes being inserted outside of the http{} block in nginx.conf. The include code block is now formatted better to suit most distribution styles of commenting in nginx.conf. REF: #256 REF: #266
2019-07-02 15:00:40 +02:00
Mitchell Krog
e8dcc77c52
ADD Repo Link into Inserted Includes
2019-07-02 10:43:24 +02:00
Mitchell Krog
34cec8f5a2
FIX setup-ngxblocker REF: #256 REF: #266
...
Reverting Changes introduced in Commit: 863bf14bab
which switched method of find_line from awk to grep
2019-06-28 21:22:57 +02:00
Mitchell Krog
1455b99621
REVERT Changes REF: #256 REF: #266
2019-06-28 19:26:11 +02:00
Mitchell Krog
2811323875
FIX setup-ngxblocker REF: #256 REF: #266
2019-06-28 17:49:23 +02:00
Stuart Cardall
07271ef488
find_binary() less ambiguous variables
...
closes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/238
2019-01-02 12:42:36 +00:00
Stuart Cardall
8787bfd7fd
fix DASH incompatibility
...
In Debian's DASH shell local variable lists need to be quoted when manipulated
positionally if the list contains a '-':
https://linux.die.net/man/1/dash
* fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/224
2018-10-29 10:51:53 +00:00
Stuart Cardall
a607f88838
fix paths in find_binary()
...
* adds /bin to search paths
2018-10-08 18:56:29 +00:00
Stuart Cardall
ebaaaf3a7a
add find_binary()
...
* centos does not have which installed by default. adds functionality
to emulate it.
part of the fix for:
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/213
2018-09-29 13:11:40 +00:00
Stuart Cardall
bcb746137b
remove wget dependency
...
* part of the fix for https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/213
2018-09-29 12:20:33 +00:00
Stuart Cardall
176573816e
setup-ngxblocker: add manual whitelisting
...
* adds -l option to manually whitelist domains
see --help
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/178
2018-06-06 20:43:46 +00:00
Stuart Cardall
5d494bdd63
setup-ngxblocker: change resolver
...
* use ifconfig.co for ip resolution
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/178
2018-06-06 20:43:46 +00:00
Stuart Cardall
b49fd65b5f
add check_nginx_directives()
...
* check for & disable conflicting nginx directives in conf.d/botblocker-nginx-settings.conf
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/156
* tidy up some whitespace in include_filelist.txt
2018-04-03 22:28:54 +00:00
Stuart Cardall
efde777b6c
Merge pull request #148 from itoffshore/alpine
...
setup-ngxblocker: add option to configure all files in $VHOST_DIR
2018-03-29 23:08:07 +01:00
Stuart Cardall
bdb0fa96bb
setup-ngxblocker: add option to configure all files
...
* adds an option to find_vhosts() to configure all files in $VHOST_DIR
if none are found with an extension of $VHOST_EXT
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/147
further fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/137
2018-03-29 22:00:01 +00:00
Stuart Cardall
4b50bf09ef
improve regex for root directive check
...
* to fix https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/138
2018-02-26 22:54:03 +00:00
Stuart Cardall
0187170776
check vhosts before testing connectivity
...
* check the repo is online after configuration checks
2018-02-26 22:04:59 +00:00
Stuart Cardall
d1e8be6945
improve error messages
...
* fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/137
2018-02-26 22:04:59 +00:00
Stuart Cardall
21830c19b6
do not add includes for redirect vhosts
...
* adds a condition to only insert includes if a vhost file contains
a root directive (to ignore vhosts which are simply redirects)
* fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/138
2018-02-26 22:04:39 +00:00
Stuart Cardall
fa873a3e20
install to /usr/local/sbin by default
...
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/133
2018-02-08 09:56:34 +00:00
Sachi
75dbb6f785
Fixing issues with different executable paths
2018-02-07 11:48:47 -08:00
Stuart Cardall
863bf14bab
setup-ngxblocker: improve find_line() detection
...
* adds regex to ignore commented lines in vhost files
2017-09-20 13:45:25 +00:00
Mitchell Krog
5956814094
PATCH: Revert to Previous Install, Setup and Update Scripts
2017-09-20 12:56:22 +02:00
Mitchell Krog
0a88e3a38f
Re-Test
2017-09-20 12:15:50 +02:00
Stuart Cardall
0618eb0909
setup-ngxblocker: add check_depends()
2017-08-26 19:30:50 +00:00
Stuart Cardall
4b012ef0ac
setup-ngxblocker: add update_paths()
...
* check for & download includes
* update hard coded bots.d path in globalblacklist.conf
2017-08-26 17:59:14 +00:00
Stuart Cardall
130f1655cb
update-ngxblocker: reload nginx from curl return code
2017-08-26 15:46:15 +00:00
Stuart Cardall
d4eb8f93b9
install-ngxblocker / setup-ngxblocker: fix DRY RUN messages
...
removes --exec from DRY RUN messages as the scripts now use short
command line switches only with getopts.
2017-07-26 15:38:53 +00:00
Stuart Cardall
3e4f1abc7d
setup-ngxblocker: fix sed error / refactor $col_size
...
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/47
2017-05-03 17:38:34 +00:00
Stuart Cardall
5c876024de
setup-ngxblocker: fix sed error in Travis
...
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/45
2017-05-02 17:22:00 +00:00
Stuart Cardall
b102e561ea
setup-ngxblocker: fix check_wildcard() / improve formatting
...
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/45
2017-05-01 16:29:30 +00:00
Stuart Cardall
f3cf01e2ad
setup-ngxblocker: add check_wildcard() / $VHOST_INCLUDES
...
add check_wildcard() to setup-ngxblocker
add $VHOST_INCLUDES to include_filelist.txt
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/pull/43
2017-04-29 02:45:28 +00:00
Stuart Cardall
4afe3094ea
fix dash shell compatibilities install / setup-ngxblocker
...
fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/39
also fixes a small spacing bug in setup-ngxblocker => nginx.conf
2017-04-27 19:28:10 +00:00
Stuart Cardall
59c34aebe7
setup-ngxblocker: use getopts not getopt
...
long options for the command line are removed. getopt is replaced with
the newer getopts (which is compatible with Debian's DASH Shell)
* fixes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/35
* adds sanity checks for user command line switches
2017-04-26 15:55:40 +00:00
Stuart Cardall
6fb21ebb61
setup-ngxblocker: update for new file structure
...
setup-ngxblocker now also sources include_filelist.txt
2017-04-21 22:07:26 +00:00
Stuart Cardall
82282b5284
add a setup script to insert the required includes
...
the script will try to insert the new configuration below any
existing includes in your config files. If the search string is
not found the inserts are made at the end of the start search
range:
* for vhost files this is below the server_* directives.
* for nginx.conf this is below http{
The search ranges & search string can be changed in main().
usage instructions can be found by running:
setup-ngxblocker -h or --help
by default running the script with no command line switches does a
"dry run" & prints to stdout the files & includes it would change:
setup-ngxblocker
to actually make changes you need to run with -x:
setup-ngxblocker -x
2017-04-15 19:35:59 +00:00