Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
K
kitsunet-tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alynna Trypnotk
kitsunet-tools
Commits
36b09e76
Commit
36b09e76
authored
Jun 18, 2019
by
Alynna Trypnotk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch only "bot" inside the user-agent string LAWL
parent
48820d7e
Pipeline
#19
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
botblocker
botblocker
+1
-1
No files found.
botblocker
View file @
36b09e76
...
@@ -19,7 +19,7 @@ ip6tables -t filter -F RTBL >/dev/null 2>&1 || true
...
@@ -19,7 +19,7 @@ ip6tables -t filter -F RTBL >/dev/null 2>&1 || true
ip6tables
-t
filter
-X
RTBL
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-X
RTBL
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-N
RTBL
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-N
RTBL
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-A
INPUT
!
-s
2603:300b:768:b000::/64
-j
RTBL
ip6tables
-t
filter
-A
INPUT
!
-s
2603:300b:768:b000::/64
-j
RTBL
tail
-n
10000 /var/log/nginx/access.log | egrep
-iv
"google|yahoo|bing"
|
grep
-i
"bot
"
|
cut
-d
' '
-f1
|
uniq
>
/var/cache/bots
tail
-n
10000 /var/log/nginx/access.log | egrep
-iv
"google|yahoo|bing"
|
egrep
-i
"
\(
.*bot.*
\)
"
|
cut
-d
' '
-f1
|
uniq
>
/var/cache/bots
for
j
in
$(
cat
/var/cache/bots
)
;
do
for
j
in
$(
cat
/var/cache/bots
)
;
do
if
[[
$j
==
*
.
*
.
*
.
*
]]
;
then
if
[[
$j
==
*
.
*
.
*
.
*
]]
;
then
iptables
-I
BOTBLOCKER
-t
filter
-s
$j
-j
DROP
iptables
-I
BOTBLOCKER
-t
filter
-s
$j
-j
DROP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment