Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eterban
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eterban
Commits
fc5dc92c
Commit
fc5dc92c
authored
Sep 07, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eterban_switcher: increase maxelem
parent
daa64fb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
eterban_switcher.py
gateway/usr/share/eterban/eterban_switcher.py
+4
-4
No files found.
gateway/usr/share/eterban/eterban_switcher.py
View file @
fc5dc92c
...
...
@@ -70,9 +70,10 @@ def restore_ipset_eterban_1():
def
create_iptables_rules
():
global
ban_server
,
ipset_eterban_1
,
ipset_firehol
,
ipset_eterban_white
,
i_interface
commands
=
[
'ipset create '
+
ipset_eterban_1
+
' iphash'
,
# set maxelem in config
commands
=
[
'ipset create '
+
ipset_eterban_1
+
' hash:ip maxelem 650000'
,
'ipset create '
+
ipset_firehol
+
' hash:net'
,
'ipset create '
+
ipset_eterban_white
+
'
iphash
'
,
'ipset create '
+
ipset_eterban_white
+
'
hash:ip
'
,
'iptables -t nat -I PREROUTING -i '
+
i_interface
+
' -m set --match-set '
+
ipset_firehol
+
' src -j DNAT --to-destination '
+
ban_server
,
'iptables -t nat -I PREROUTING -i '
+
i_interface
+
' -m set --match-set '
+
ipset_eterban_1
+
' src -j DNAT --to-destination '
+
ban_server
,
'iptables -t nat -I PREROUTING -i '
+
i_interface
+
' -m set --match-set '
+
ipset_eterban_white
+
' src -j ACCEPT'
,
...
...
@@ -167,4 +168,4 @@ for message in p.listen():
log
.
write
(
info
)
log
.
flush
()
else
:
pass
\ No newline at end of file
pass
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