Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5d110470
authored
Feb 19, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: whitelist fix
parent
1b7d6142
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
firewall/fw.py
+3
-2
No files found.
firewall/fw.py
View file @
5d110470
...
@@ -7,6 +7,7 @@ import subprocess
...
@@ -7,6 +7,7 @@ import subprocess
import
re
import
re
import
json
import
json
from
datetime
import
datetime
,
timedelta
from
datetime
import
datetime
,
timedelta
from
django.db.models
import
Q
class
firewall
:
class
firewall
:
...
@@ -298,9 +299,9 @@ class firewall:
...
@@ -298,9 +299,9 @@ class firewall:
return
(
'
\n
'
.
join
(
self
.
RULES
)
+
'
\n
'
+
return
(
'
\n
'
.
join
(
self
.
RULES
)
+
'
\n
'
+
'
\n
'
.
join
(
self
.
RULES_NAT
)
+
'
\n
'
)
'
\n
'
.
join
(
self
.
RULES_NAT
)
+
'
\n
'
)
def
ipset
(
self
):
def
ipset
():
week
=
datetime
.
now
()
-
timedelta
(
days
=
7
)
week
=
datetime
.
now
()
-
timedelta
(
days
=
7
)
return
models
.
Blacklist
.
objects
.
filter
(
modified_at__gte
=
week
)
.
values_list
(
'ipv4'
,
flat
=
True
)
return
models
.
Blacklist
.
objects
.
filter
(
Q
(
type
=
'tempban'
,
modified_at__gte
=
week
)
|
Q
(
type
=
'permban'
)
)
.
values_list
(
'ipv4'
,
flat
=
True
)
def
ipv6_to_octal
(
ipv6
):
def
ipv6_to_octal
(
ipv6
):
...
...
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