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
48820d7e
Commit
48820d7e
authored
Jun 18, 2019
by
Alynna Trypnotk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update botblocker
parent
eb773e31
Pipeline
#18
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
botblocker
botblocker
+17
-0
No files found.
botblocker
View file @
48820d7e
...
@@ -9,6 +9,16 @@ ip6tables -t filter -F BOTBLOCKER >/dev/null 2>&1 || true
...
@@ -9,6 +9,16 @@ ip6tables -t filter -F BOTBLOCKER >/dev/null 2>&1 || true
ip6tables
-t
filter
-X
BOTBLOCKER
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-X
BOTBLOCKER
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-N
BOTBLOCKER
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-N
BOTBLOCKER
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-A
INPUT
!
-s
2603:300b:768:b000::/64
-j
BOTBLOCKER
ip6tables
-t
filter
-A
INPUT
!
-s
2603:300b:768:b000::/64
-j
BOTBLOCKER
iptables
-t
filter
-D
INPUT
!
-s
10.0.0.0/8
-j
RTBL
>
/dev/null 2>&1
||
true
iptables
-t
filter
-F
RTBL
>
/dev/null 2>&1
||
true
iptables
-t
filter
-X
RTBL
>
/dev/null 2>&1
||
true
iptables
-t
filter
-N
RTBL
>
/dev/null 2>&1
||
true
iptables
-t
filter
-A
INPUT
!
-s
10.0.0.0/8
-j
RTBL
ip6tables
-t
filter
-D
INPUT
!
-s
2603:300b:768:b000::/64
-j
RTBL
>
/dev/null 2>&1
||
true
ip6tables
-t
filter
-F
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
-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"
|
grep
-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
...
@@ -17,3 +27,10 @@ for j in $(cat /var/cache/bots); do
...
@@ -17,3 +27,10 @@ for j in $(cat /var/cache/bots); do
ip6tables
-I
BOTBLOCKER
-t
filter
-s
$j
/64
-j
DROP
ip6tables
-I
BOTBLOCKER
-t
filter
-s
$j
/64
-j
DROP
fi
fi
done
done
for
j
in
$(
cat
/etc/rtbl
)
;
do
if
[[
$j
==
*
.
*
.
*
.
*
]]
;
then
iptables
-I
RTBL
-t
filter
-s
$j
-j
DROP
elif
[[
$j
==
*
:
*
]]
;
then
ip6tables
-I
RTBL
-t
filter
-s
$j
-j
DROP
fi
done
\ No newline at end of file
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