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