-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstance_config_override.example.py
More file actions
98 lines (88 loc) · 2.7 KB
/
instance_config_override.example.py
File metadata and controls
98 lines (88 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# This file can be simply ignored if you do not need to override anything
# Example instance config override
# If you need to override some settings, you can do it here.
# Copy this to instance_config_override.py and customize
# column names for tables
RTBH_COLUMNS = (
("ipv4", "IP address (v4 or v6)"),
("community_id", "Community"),
("expires", "Expires"),
("user_id", "User"),
)
WHITELIST_COLUMNS = (
("address", "IP address / network (v4 or v6)"),
("expires", "Expires"),
("user_id", "User"),
)
RULES_COLUMNS_V4 = (
("source", "Source addr."),
("source_port", "S port"),
("dest", "Dest. addr."),
("dest_port", "D port"),
("protocol", "Proto"),
("packet_len", "Packet len"),
("expires", "Expires"),
("action_id", "Action"),
("flags", "Flags"),
("user_id", "User"),
)
RULES_COLUMNS_V6 = (
("source", "Source addr."),
("source_port", "S port"),
("dest", "Dest. addr."),
("dest_port", "D port"),
("next_header", "Next header"),
("packet_len", "Packet len"),
("expires", "Expires"),
("action_id", "Action"),
("flags", "Flags"),
("user_id", "User"),
)
# Customize main menu
MAIN_MENU = {
"edit": [
{"name": "Add RTBH", "url": "rules.rtbh_rule"},
{"name": "Add Whitelist", "url": "whitelist.add"},
{"name": "API Key", "url": "api_keys.all"},
],
"admin": [
{"name": "Commands Log", "url": "admin.log"},
{"name": "Machine keys", "url": "admin.machine_keys"},
{
"name": "Users",
"url": "admin.users",
"divide_before": True,
},
{"name": "Add User", "url": "admin.user"},
{"name": "Add Multiple Users", "url": "admin.bulk_import_users"},
{"name": "Organizations", "url": "admin.organizations"},
{"name": "Add Org.", "url": "admin.organization"},
{
"name": "Action",
"url": "admin.actions",
"divide_before": True,
},
{"name": "Add action", "url": "admin.action"},
{"name": "RTBH Communities", "url": "admin.communities"},
{"name": "Add RTBH Comm.", "url": "admin.community"},
],
}
# Customize dashboard - only include what you need
DASHBOARD = {
"rtbh": {
"name": "RTBH",
"macro_file": "macros.html",
"macro_tbody": "build_rtbh_tbody",
"macro_thead": "build_rules_thead",
"table_colspan": 5,
"table_columns": RTBH_COLUMNS,
},
"whitelist": {
"name": "Whitelist",
"macro_file": "macros.html",
"macro_tbody": "build_whitelist_tbody",
"macro_thead": "build_rules_thead",
"table_colspan": 4,
"table_columns": WHITELIST_COLUMNS,
},
}