Top-level format
A preset must be a JSON array of rule objects.
[
{
"rule_type": "stateful_tracking",
"scope": "global",
"protocol": "both",
"value_json": { "enabled": true }
},
{
"rule_type": "syn_limit",
"scope": "port",
"port": 25565,
"protocol": "tcp",
"value_json": { "limit": "50/second", "burst": 100 }
}
]
How scope works: global vs port
"scope": "global" - applies to all server allocations/ports.
"scope": "port" - applies only to one specific port, and port is required.
- When
scope is port, port is not auto-filled. You must set a valid port on each port-scoped rule.
- If a port-scoped rule has an invalid/missing port, firewall apply is expected to fail that rule validation.
Required keys per rule
rule_type (string) - internal rule key.
scope - global or port.
protocol - both, tcp, or udp.
value_json (object) - rule-specific settings.
port (number) - required only when scope is port.
Common value_json examples
syn_limit/tcp_limit/udp_limit: {"limit":"500/second","burst":1000}
connection_limit: {"max_concurrent": 25}
packet_size_filter: {"min_size":20,"max_size":1500}
ttl_filter: {"min_ttl":10,"max_ttl":255}
stateful_tracking/fragmented_drop: {"enabled":true}
Rule type examples (global and port)
Use global for broad baseline protection, and port scope when you need a stricter rule on one service port.
[
{ "rule_type":"stateful_tracking", "scope":"global", "protocol":"both", "value_json":{"enabled":true} },
{ "rule_type":"fragmented_drop", "scope":"global", "protocol":"both", "value_json":{"enabled":true} },
{ "rule_type":"packet_size_filter", "scope":"global", "protocol":"both", "value_json":{"min_size":20,"max_size":1500} },
{ "rule_type":"ttl_filter", "scope":"global", "protocol":"both", "value_json":{"min_ttl":10,"max_ttl":255} },
{ "rule_type":"syn_limit", "scope":"global", "protocol":"tcp", "value_json":{"limit":"50/second","burst":100} },
{ "rule_type":"source_packet_limit", "scope":"global", "protocol":"both", "value_json":{"limit":"500/second","burst":1000} },
{ "rule_type":"global_packet_limit", "scope":"global", "protocol":"both", "value_json":{"limit":"5000/second","burst":10000} },
{ "rule_type":"new_conn_limit", "scope":"global", "protocol":"tcp", "value_json":{"limit":"30/second","burst":60} },
{ "rule_type":"connection_limit", "scope":"global", "protocol":"both", "value_json":{"max_concurrent":25} },
{ "rule_type":"syn_limit", "scope":"port", "port":25565, "protocol":"tcp", "value_json":{"limit":"35/second","burst":70} },
{ "rule_type":"source_packet_limit", "scope":"port", "port":25565, "protocol":"both", "value_json":{"limit":"400/second","burst":800} },
{ "rule_type":"connection_limit", "scope":"port", "port":25565, "protocol":"both", "value_json":{"max_concurrent":18} }
]
Minimal templates by rule kind
- Boolean rules (
stateful_tracking, fragmented_drop): {"enabled":true}
- Rate rules (
syn_limit, source_packet_limit, global_packet_limit, new_conn_limit): {"limit":"N/second","burst":M}
- Connection rules (
connection_limit): {"max_concurrent":N}
- Range rules (
packet_size_filter, ttl_filter): min/max pairs
Tip: duplicate an existing preset in the Edit tab, rename it, then tweak JSON incrementally.