@usex/mikrotik-mcp 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +4057 -2223
- package/dist/index.js +3707 -2094
- package/dist/ui/observability.html +67 -14
- package/package.json +8 -2
- package/schemas/README.md +1 -1
- package/schemas/tool-catalog.json +1052 -25
- package/schemas/tools/apply_traffic_shaping.json +48 -0
- package/schemas/tools/audit_certificate_expiry.json +16 -0
- package/schemas/tools/audit_firewall_hardening.json +7 -0
- package/schemas/tools/build_guest_hotspot.json +48 -0
- package/schemas/tools/build_wireguard_mesh.json +79 -0
- package/schemas/tools/create_filter_rule.json +1 -1
- package/schemas/tools/design_network_segment.json +65 -0
- package/schemas/tools/forecast_link_saturation.json +23 -0
- package/schemas/tools/forward_port.json +45 -0
- package/schemas/tools/generate_hotspot_vouchers.json +33 -0
- package/schemas/tools/harden_firewall.json +104 -0
- package/schemas/tools/onboard_wireguard_user.json +39 -0
- package/schemas/tools/remove_firewall_hardening.json +7 -0
- package/schemas/tools/remove_threat_feed.json +13 -0
- package/schemas/tools/remove_time_policy.json +13 -0
- package/schemas/tools/request_letsencrypt_certificate.json +13 -0
- package/schemas/tools/revoke_wireguard_user.json +13 -0
- package/schemas/tools/run_failover_drill.json +33 -0
- package/schemas/tools/set_time_policy.json +47 -0
- package/schemas/tools/setup_port_knock.json +39 -0
- package/schemas/tools/setup_wan_failover.json +36 -0
- package/schemas/tools/setup_wan_loadbalance.json +32 -0
- package/schemas/tools/subscribe_threat_feed.json +37 -0
- package/schemas/tools/tune_wifi_channel.json +23 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"generated": "by scripts/gen-schemas.ts — do not edit by hand",
|
|
5
|
-
"toolCount":
|
|
5
|
+
"toolCount": 693,
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "list_interfaces",
|
|
@@ -312,6 +312,80 @@
|
|
|
312
312
|
"additionalProperties": false
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
|
+
{
|
|
316
|
+
"name": "design_network_segment",
|
|
317
|
+
"title": "Design Isolated VLAN Segment",
|
|
318
|
+
"risk": "dangerous",
|
|
319
|
+
"annotations": {
|
|
320
|
+
"destructiveHint": true,
|
|
321
|
+
"openWorldHint": false
|
|
322
|
+
},
|
|
323
|
+
"description": "Stands up a complete isolated network segment in one call: a VLAN interface on the bridge, its gateway IP, a DHCP server + pool + network, optional internet access (srcnat masquerade), and inter-VLAN isolation firewall rules — e.g. 'a guest VLAN that reaches the internet but not the LAN'. DEFAULTS TO A DRY RUN (`apply=false`) showing every command grouped; set `apply=true` to build it. Bridge VLAN tagging is added when `tagged_ports`/`untagged_ports` are given (requires bridge vlan-filtering). Isolation drops forward traffic from this subnet to each `isolate_from` subnet. Returns the plan or a build report.",
|
|
324
|
+
"inputSchema": {
|
|
325
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"vlan_id": {
|
|
329
|
+
"type": "integer",
|
|
330
|
+
"minimum": 1,
|
|
331
|
+
"maximum": 4094
|
|
332
|
+
},
|
|
333
|
+
"name": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"description": "Name for the VLAN interface, e.g. 'guest'"
|
|
336
|
+
},
|
|
337
|
+
"subnet": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"description": "CIDR for the segment, e.g. '192.168.30.0/24'"
|
|
340
|
+
},
|
|
341
|
+
"gateway": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"description": "Router's address in the segment, e.g. '192.168.30.1'"
|
|
344
|
+
},
|
|
345
|
+
"bridge": {
|
|
346
|
+
"default": "bridge",
|
|
347
|
+
"description": "Bridge to put the VLAN on",
|
|
348
|
+
"type": "string"
|
|
349
|
+
},
|
|
350
|
+
"tagged_ports": {
|
|
351
|
+
"description": "Comma-separated trunk/tagged ports (+ the bridge)",
|
|
352
|
+
"type": "string"
|
|
353
|
+
},
|
|
354
|
+
"untagged_ports": {
|
|
355
|
+
"description": "Comma-separated access/untagged ports",
|
|
356
|
+
"type": "string"
|
|
357
|
+
},
|
|
358
|
+
"dhcp": {
|
|
359
|
+
"default": true,
|
|
360
|
+
"description": "Create a DHCP server + pool for the segment",
|
|
361
|
+
"type": "boolean"
|
|
362
|
+
},
|
|
363
|
+
"dhcp_range": {
|
|
364
|
+
"description": "Pool range; defaults to .10–.254 of the subnet",
|
|
365
|
+
"type": "string"
|
|
366
|
+
},
|
|
367
|
+
"internet": {
|
|
368
|
+
"default": true,
|
|
369
|
+
"description": "Allow internet access via srcnat masquerade",
|
|
370
|
+
"type": "boolean"
|
|
371
|
+
},
|
|
372
|
+
"isolate_from": {
|
|
373
|
+
"description": "Subnets this segment must NOT reach, e.g. ['192.168.1.0/24']",
|
|
374
|
+
"type": "array",
|
|
375
|
+
"items": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"apply": {
|
|
380
|
+
"default": false,
|
|
381
|
+
"description": "false = preview (default); true = build",
|
|
382
|
+
"type": "boolean"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"required": ["vlan_id", "name", "subnet", "gateway", "bridge", "dhcp", "internet", "apply"],
|
|
386
|
+
"additionalProperties": false
|
|
387
|
+
}
|
|
388
|
+
},
|
|
315
389
|
{
|
|
316
390
|
"name": "create_bridge",
|
|
317
391
|
"title": "Create Bridge Interface",
|
|
@@ -1084,6 +1158,38 @@
|
|
|
1084
1158
|
"additionalProperties": false
|
|
1085
1159
|
}
|
|
1086
1160
|
},
|
|
1161
|
+
{
|
|
1162
|
+
"name": "tune_wifi_channel",
|
|
1163
|
+
"title": "Survey & Tune Wi-Fi Channel",
|
|
1164
|
+
"risk": "write",
|
|
1165
|
+
"annotations": {
|
|
1166
|
+
"destructiveHint": false,
|
|
1167
|
+
"openWorldHint": false
|
|
1168
|
+
},
|
|
1169
|
+
"description": "Runs an RF survey on a wireless radio (`/interface wireless frequency-monitor`, blocking for `duration`), finds the least-congested channel, and reports a before/after. DEFAULTS TO A DRY RUN (`apply=false`) — it surveys and recommends; set `apply=true` to set the radio to the best frequency (`/interface wireless set`). Targets the LEGACY wireless stack; for wifiwave2 (`/interface wifi`) tune via those tools. Returns the per-channel usage finding and the chosen frequency.",
|
|
1170
|
+
"inputSchema": {
|
|
1171
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1172
|
+
"type": "object",
|
|
1173
|
+
"properties": {
|
|
1174
|
+
"interface": {
|
|
1175
|
+
"type": "string",
|
|
1176
|
+
"description": "Wireless interface, e.g. 'wlan1'"
|
|
1177
|
+
},
|
|
1178
|
+
"duration": {
|
|
1179
|
+
"default": "5",
|
|
1180
|
+
"description": "Survey duration in seconds",
|
|
1181
|
+
"type": "string"
|
|
1182
|
+
},
|
|
1183
|
+
"apply": {
|
|
1184
|
+
"default": false,
|
|
1185
|
+
"description": "false = survey & recommend (default); true = set it",
|
|
1186
|
+
"type": "boolean"
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
"required": ["interface", "duration", "apply"],
|
|
1190
|
+
"additionalProperties": false
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1087
1193
|
{
|
|
1088
1194
|
"name": "get_poe_monitor",
|
|
1089
1195
|
"title": "Read PoE Interface Live Metrics",
|
|
@@ -2538,6 +2644,92 @@
|
|
|
2538
2644
|
"additionalProperties": false
|
|
2539
2645
|
}
|
|
2540
2646
|
},
|
|
2647
|
+
{
|
|
2648
|
+
"name": "setup_wan_failover",
|
|
2649
|
+
"title": "Set Up Multi-WAN Failover",
|
|
2650
|
+
"risk": "dangerous",
|
|
2651
|
+
"annotations": {
|
|
2652
|
+
"destructiveHint": true,
|
|
2653
|
+
"openWorldHint": false
|
|
2654
|
+
},
|
|
2655
|
+
"description": "Builds ACTIVE-PASSIVE multi-WAN failover by adding health-checked default routes with ascending distances (primary=1, each backup +1). RouterOS uses the lowest-distance reachable route; `check-gateway` withdraws a route when its gateway stops answering, so traffic fails over to the next WAN — and fails back automatically when the primary recovers. DEFAULTS TO A DRY RUN (`apply=false`) so you can review before changing default routing (which can cut your own access); set `apply=true` to execute. Does NOT remove existing 0.0.0.0/0 routes — clear conflicting ones first with the route tools. For load balancing instead of failover use setup_wan_loadbalance. Returns the plan or the resulting default routes.",
|
|
2656
|
+
"inputSchema": {
|
|
2657
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2658
|
+
"type": "object",
|
|
2659
|
+
"properties": {
|
|
2660
|
+
"primary_gateway": {
|
|
2661
|
+
"type": "string",
|
|
2662
|
+
"description": "Primary WAN gateway IP (or interface name)"
|
|
2663
|
+
},
|
|
2664
|
+
"backup_gateways": {
|
|
2665
|
+
"minItems": 1,
|
|
2666
|
+
"type": "array",
|
|
2667
|
+
"items": {
|
|
2668
|
+
"type": "string"
|
|
2669
|
+
},
|
|
2670
|
+
"description": "One or more backup WAN gateways, in failover order"
|
|
2671
|
+
},
|
|
2672
|
+
"check": {
|
|
2673
|
+
"default": "ping",
|
|
2674
|
+
"description": "Gateway health-check method",
|
|
2675
|
+
"type": "string",
|
|
2676
|
+
"enum": ["ping", "arp"]
|
|
2677
|
+
},
|
|
2678
|
+
"comment_prefix": {
|
|
2679
|
+
"default": "wan-failover",
|
|
2680
|
+
"type": "string"
|
|
2681
|
+
},
|
|
2682
|
+
"apply": {
|
|
2683
|
+
"default": false,
|
|
2684
|
+
"description": "false = preview only (default); true = execute",
|
|
2685
|
+
"type": "boolean"
|
|
2686
|
+
}
|
|
2687
|
+
},
|
|
2688
|
+
"required": ["primary_gateway", "backup_gateways", "check", "comment_prefix", "apply"],
|
|
2689
|
+
"additionalProperties": false
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
{
|
|
2693
|
+
"name": "setup_wan_loadbalance",
|
|
2694
|
+
"title": "Set Up Multi-WAN Load Balancing (ECMP)",
|
|
2695
|
+
"risk": "dangerous",
|
|
2696
|
+
"annotations": {
|
|
2697
|
+
"destructiveHint": true,
|
|
2698
|
+
"openWorldHint": false
|
|
2699
|
+
},
|
|
2700
|
+
"description": "Builds ECMP (equal-cost multi-path) load balancing across multiple WANs by adding ONE default route whose `gateway` lists every WAN — RouterOS then spreads connections across the links (per-connection, so a single flow stays on one WAN). `check-gateway` drops a dead link from the set. DEFAULTS TO A DRY RUN (`apply=false`); set `apply=true` to execute. Does NOT remove existing 0.0.0.0/0 routes — clear conflicting ones first. ECMP is simple but balances by connection-hash, not by bandwidth; for sticky per-source balancing (PCC) use the firewall mangle + routing-table tools. For failover instead of balancing use setup_wan_failover. Returns the plan or the resulting default route.",
|
|
2701
|
+
"inputSchema": {
|
|
2702
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2703
|
+
"type": "object",
|
|
2704
|
+
"properties": {
|
|
2705
|
+
"gateways": {
|
|
2706
|
+
"minItems": 2,
|
|
2707
|
+
"type": "array",
|
|
2708
|
+
"items": {
|
|
2709
|
+
"type": "string"
|
|
2710
|
+
},
|
|
2711
|
+
"description": "Two or more WAN gateways to balance across"
|
|
2712
|
+
},
|
|
2713
|
+
"check": {
|
|
2714
|
+
"default": "ping",
|
|
2715
|
+
"description": "Gateway health-check method",
|
|
2716
|
+
"type": "string",
|
|
2717
|
+
"enum": ["ping", "arp"]
|
|
2718
|
+
},
|
|
2719
|
+
"comment": {
|
|
2720
|
+
"default": "wan-ecmp",
|
|
2721
|
+
"type": "string"
|
|
2722
|
+
},
|
|
2723
|
+
"apply": {
|
|
2724
|
+
"default": false,
|
|
2725
|
+
"description": "false = preview only (default); true = execute",
|
|
2726
|
+
"type": "boolean"
|
|
2727
|
+
}
|
|
2728
|
+
},
|
|
2729
|
+
"required": ["gateways", "check", "comment", "apply"],
|
|
2730
|
+
"additionalProperties": false
|
|
2731
|
+
}
|
|
2732
|
+
},
|
|
2541
2733
|
{
|
|
2542
2734
|
"name": "create_dhcp_server",
|
|
2543
2735
|
"title": "Create DHCP Server Instance",
|
|
@@ -2750,6 +2942,105 @@
|
|
|
2750
2942
|
"additionalProperties": false
|
|
2751
2943
|
}
|
|
2752
2944
|
},
|
|
2945
|
+
{
|
|
2946
|
+
"name": "build_guest_hotspot",
|
|
2947
|
+
"title": "Build Guest Hotspot (Captive Portal)",
|
|
2948
|
+
"risk": "dangerous",
|
|
2949
|
+
"annotations": {
|
|
2950
|
+
"destructiveHint": true,
|
|
2951
|
+
"openWorldHint": false
|
|
2952
|
+
},
|
|
2953
|
+
"description": "Stands up a guest hotspot with a captive sign-in portal in one call: the gateway IP, an address pool, a DHCP server, the `/ip hotspot` server + profile (with a per-guest `rate_limit` bandwidth cap and optional `dns_name`), and a walled garden (the `walled_garden` domains reachable BEFORE sign-in, e.g. your payment/login pages). DEFAULTS TO A DRY RUN (`apply=false`) showing every command; set `apply=true` to build it. Generate printable guest codes with generate_hotspot_vouchers. Returns the plan or a build report.",
|
|
2954
|
+
"inputSchema": {
|
|
2955
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2956
|
+
"type": "object",
|
|
2957
|
+
"properties": {
|
|
2958
|
+
"interface": {
|
|
2959
|
+
"type": "string",
|
|
2960
|
+
"description": "Interface/bridge the hotspot runs on, e.g. 'guest-bridge'"
|
|
2961
|
+
},
|
|
2962
|
+
"subnet": {
|
|
2963
|
+
"default": "10.5.50.0/24",
|
|
2964
|
+
"description": "Hotspot subnet",
|
|
2965
|
+
"type": "string"
|
|
2966
|
+
},
|
|
2967
|
+
"gateway": {
|
|
2968
|
+
"default": "10.5.50.1",
|
|
2969
|
+
"description": "Router address in the hotspot subnet",
|
|
2970
|
+
"type": "string"
|
|
2971
|
+
},
|
|
2972
|
+
"pool_range": {
|
|
2973
|
+
"description": "DHCP/hotspot pool; defaults to .10–.254",
|
|
2974
|
+
"type": "string"
|
|
2975
|
+
},
|
|
2976
|
+
"dns_name": {
|
|
2977
|
+
"description": "Captive-portal hostname, e.g. 'guest.wifi'",
|
|
2978
|
+
"type": "string"
|
|
2979
|
+
},
|
|
2980
|
+
"rate_limit": {
|
|
2981
|
+
"default": "5M/5M",
|
|
2982
|
+
"description": "Per-guest max-limit (rx/tx)",
|
|
2983
|
+
"type": "string"
|
|
2984
|
+
},
|
|
2985
|
+
"walled_garden": {
|
|
2986
|
+
"description": "Domains reachable before sign-in, e.g. ['*.stripe.com']",
|
|
2987
|
+
"type": "array",
|
|
2988
|
+
"items": {
|
|
2989
|
+
"type": "string"
|
|
2990
|
+
}
|
|
2991
|
+
},
|
|
2992
|
+
"apply": {
|
|
2993
|
+
"default": false,
|
|
2994
|
+
"description": "false = preview (default); true = build",
|
|
2995
|
+
"type": "boolean"
|
|
2996
|
+
}
|
|
2997
|
+
},
|
|
2998
|
+
"required": ["interface", "subnet", "gateway", "rate_limit", "apply"],
|
|
2999
|
+
"additionalProperties": false
|
|
3000
|
+
}
|
|
3001
|
+
},
|
|
3002
|
+
{
|
|
3003
|
+
"name": "generate_hotspot_vouchers",
|
|
3004
|
+
"title": "Generate Hotspot Vouchers",
|
|
3005
|
+
"risk": "write",
|
|
3006
|
+
"annotations": {
|
|
3007
|
+
"destructiveHint": false,
|
|
3008
|
+
"openWorldHint": false
|
|
3009
|
+
},
|
|
3010
|
+
"description": "Creates `count` random guest login codes as `/ip hotspot user` entries (username = password = code), each with an optional uptime limit and hotspot user profile — the printable vouchers you hand to guests. DEFAULTS TO A DRY RUN (`apply=false`) that just shows the codes it would create; set `apply=true` to add them. Returns the generated codes.",
|
|
3011
|
+
"inputSchema": {
|
|
3012
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3013
|
+
"type": "object",
|
|
3014
|
+
"properties": {
|
|
3015
|
+
"count": {
|
|
3016
|
+
"default": 10,
|
|
3017
|
+
"type": "integer",
|
|
3018
|
+
"minimum": 1,
|
|
3019
|
+
"maximum": 200
|
|
3020
|
+
},
|
|
3021
|
+
"uptime_limit": {
|
|
3022
|
+
"description": "Per-voucher uptime, e.g. '1h', '1d'",
|
|
3023
|
+
"type": "string"
|
|
3024
|
+
},
|
|
3025
|
+
"profile": {
|
|
3026
|
+
"description": "Hotspot user profile to assign",
|
|
3027
|
+
"type": "string"
|
|
3028
|
+
},
|
|
3029
|
+
"code_prefix": {
|
|
3030
|
+
"default": "g",
|
|
3031
|
+
"description": "Prefix for the generated codes",
|
|
3032
|
+
"type": "string"
|
|
3033
|
+
},
|
|
3034
|
+
"apply": {
|
|
3035
|
+
"default": false,
|
|
3036
|
+
"description": "false = preview codes (default); true = create",
|
|
3037
|
+
"type": "boolean"
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
"required": ["count", "code_prefix", "apply"],
|
|
3041
|
+
"additionalProperties": false
|
|
3042
|
+
}
|
|
3043
|
+
},
|
|
2753
3044
|
{
|
|
2754
3045
|
"name": "set_dns_servers",
|
|
2755
3046
|
"title": "Configure DNS Resolver Settings",
|
|
@@ -3226,6 +3517,85 @@
|
|
|
3226
3517
|
"additionalProperties": false
|
|
3227
3518
|
}
|
|
3228
3519
|
},
|
|
3520
|
+
{
|
|
3521
|
+
"name": "set_time_policy",
|
|
3522
|
+
"title": "Set Time-of-Day / Parental Policy",
|
|
3523
|
+
"risk": "write",
|
|
3524
|
+
"annotations": {
|
|
3525
|
+
"destructiveHint": false,
|
|
3526
|
+
"openWorldHint": false
|
|
3527
|
+
},
|
|
3528
|
+
"description": "Schedules per-device internet access and content blocking. Cuts internet for devices in the `list` address-list between `block_start` and `block_end` daily (a forward-drop rule toggled by two schedulers), optionally adds `addresses` to that list, and DNS-sinkholes any `block_domains` (always blocked). DEFAULTS TO A DRY RUN (`apply=false`) showing every command; set `apply=true` to install. Everything is tagged 'parental-<name>' so remove_time_policy can undo it. Returns the plan or a build report.",
|
|
3529
|
+
"inputSchema": {
|
|
3530
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3531
|
+
"type": "object",
|
|
3532
|
+
"properties": {
|
|
3533
|
+
"name": {
|
|
3534
|
+
"type": "string",
|
|
3535
|
+
"description": "Policy id, e.g. 'kids-bedtime'"
|
|
3536
|
+
},
|
|
3537
|
+
"list": {
|
|
3538
|
+
"default": "parental-devices",
|
|
3539
|
+
"description": "Address-list of the affected devices",
|
|
3540
|
+
"type": "string"
|
|
3541
|
+
},
|
|
3542
|
+
"addresses": {
|
|
3543
|
+
"description": "Device IPs to add to the list",
|
|
3544
|
+
"type": "array",
|
|
3545
|
+
"items": {
|
|
3546
|
+
"type": "string"
|
|
3547
|
+
}
|
|
3548
|
+
},
|
|
3549
|
+
"block_start": {
|
|
3550
|
+
"default": "22:00",
|
|
3551
|
+
"description": "Daily cut-off time (HH:MM)",
|
|
3552
|
+
"type": "string"
|
|
3553
|
+
},
|
|
3554
|
+
"block_end": {
|
|
3555
|
+
"default": "07:00",
|
|
3556
|
+
"description": "Daily restore time (HH:MM)",
|
|
3557
|
+
"type": "string"
|
|
3558
|
+
},
|
|
3559
|
+
"block_domains": {
|
|
3560
|
+
"description": "Domains to always block via DNS",
|
|
3561
|
+
"type": "array",
|
|
3562
|
+
"items": {
|
|
3563
|
+
"type": "string"
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
"apply": {
|
|
3567
|
+
"default": false,
|
|
3568
|
+
"description": "false = preview (default); true = install",
|
|
3569
|
+
"type": "boolean"
|
|
3570
|
+
}
|
|
3571
|
+
},
|
|
3572
|
+
"required": ["name", "list", "block_start", "block_end", "apply"],
|
|
3573
|
+
"additionalProperties": false
|
|
3574
|
+
}
|
|
3575
|
+
},
|
|
3576
|
+
{
|
|
3577
|
+
"name": "remove_time_policy",
|
|
3578
|
+
"title": "Remove Time-of-Day / Parental Policy",
|
|
3579
|
+
"risk": "destructive",
|
|
3580
|
+
"annotations": {
|
|
3581
|
+
"destructiveHint": true,
|
|
3582
|
+
"idempotentHint": true,
|
|
3583
|
+
"openWorldHint": false
|
|
3584
|
+
},
|
|
3585
|
+
"description": "Removes a policy installed by set_time_policy: the schedulers, the forward-drop rule, and the DNS sinkhole entries tagged 'parental-<name>'. Address-list members added for it are also removed. Returns what was cleared.",
|
|
3586
|
+
"inputSchema": {
|
|
3587
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3588
|
+
"type": "object",
|
|
3589
|
+
"properties": {
|
|
3590
|
+
"name": {
|
|
3591
|
+
"type": "string",
|
|
3592
|
+
"description": "The policy id used when installing"
|
|
3593
|
+
}
|
|
3594
|
+
},
|
|
3595
|
+
"required": ["name"],
|
|
3596
|
+
"additionalProperties": false
|
|
3597
|
+
}
|
|
3598
|
+
},
|
|
3229
3599
|
{
|
|
3230
3600
|
"name": "add_ipv6_address",
|
|
3231
3601
|
"title": "Add IPv6 Address to Interface",
|
|
@@ -9335,7 +9705,7 @@
|
|
|
9335
9705
|
"type": "string"
|
|
9336
9706
|
},
|
|
9337
9707
|
"place_before": {
|
|
9338
|
-
"description": "
|
|
9708
|
+
"description": "Insert before this position. Either a bare ordinal/row number (e.g. \"0\", \"13\") OR a CURRENT internal .id (\"*N\") from list_filter_rules. Note: a \"*N\" .id is hexadecimal and reassigned over time — it is NOT the row number, so \"*13\" ≠ the 13th rule.",
|
|
9339
9709
|
"type": "string"
|
|
9340
9710
|
}
|
|
9341
9711
|
},
|
|
@@ -9905,6 +10275,60 @@
|
|
|
9905
10275
|
"additionalProperties": false
|
|
9906
10276
|
}
|
|
9907
10277
|
},
|
|
10278
|
+
{
|
|
10279
|
+
"name": "forward_port",
|
|
10280
|
+
"title": "Forward a Port (Smart Wizard)",
|
|
10281
|
+
"risk": "dangerous",
|
|
10282
|
+
"annotations": {
|
|
10283
|
+
"destructiveHint": true,
|
|
10284
|
+
"openWorldHint": false
|
|
10285
|
+
},
|
|
10286
|
+
"description": "Exposes an internal service correctly and completely in one call: the DST-NAT rule that forwards `external_port` to `internal_host:internal_port`, the matching forward-chain accept (so it passes a default-drop firewall), and — when `lan_subnet` is given — the hairpin/loopback srcnat so the service also works when reached from inside the LAN via the public IP. DEFAULTS TO A DRY RUN (`apply=false`) showing every rule; set `apply=true` to create them. All rules are tagged 'port-forward:'. Returns the plan or a build report.",
|
|
10287
|
+
"inputSchema": {
|
|
10288
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10289
|
+
"type": "object",
|
|
10290
|
+
"properties": {
|
|
10291
|
+
"protocol": {
|
|
10292
|
+
"default": "tcp",
|
|
10293
|
+
"type": "string",
|
|
10294
|
+
"enum": ["tcp", "udp"]
|
|
10295
|
+
},
|
|
10296
|
+
"external_port": {
|
|
10297
|
+
"type": "integer",
|
|
10298
|
+
"minimum": 1,
|
|
10299
|
+
"maximum": 65535
|
|
10300
|
+
},
|
|
10301
|
+
"internal_host": {
|
|
10302
|
+
"type": "string",
|
|
10303
|
+
"description": "LAN IP of the service, e.g. '192.168.1.10'"
|
|
10304
|
+
},
|
|
10305
|
+
"internal_port": {
|
|
10306
|
+
"description": "Defaults to external_port",
|
|
10307
|
+
"type": "integer",
|
|
10308
|
+
"minimum": 1,
|
|
10309
|
+
"maximum": 65535
|
|
10310
|
+
},
|
|
10311
|
+
"wan_interface": {
|
|
10312
|
+
"description": "Restrict the forward to this WAN interface",
|
|
10313
|
+
"type": "string"
|
|
10314
|
+
},
|
|
10315
|
+
"lan_subnet": {
|
|
10316
|
+
"description": "LAN subnet for hairpin NAT, e.g. '192.168.1.0/24'",
|
|
10317
|
+
"type": "string"
|
|
10318
|
+
},
|
|
10319
|
+
"comment": {
|
|
10320
|
+
"type": "string"
|
|
10321
|
+
},
|
|
10322
|
+
"apply": {
|
|
10323
|
+
"default": false,
|
|
10324
|
+
"description": "false = preview (default); true = create",
|
|
10325
|
+
"type": "boolean"
|
|
10326
|
+
}
|
|
10327
|
+
},
|
|
10328
|
+
"required": ["protocol", "external_port", "internal_host", "apply"],
|
|
10329
|
+
"additionalProperties": false
|
|
10330
|
+
}
|
|
10331
|
+
},
|
|
9908
10332
|
{
|
|
9909
10333
|
"name": "add_address_list_entry",
|
|
9910
10334
|
"title": "Add Firewall Address-List Entry",
|
|
@@ -10095,6 +10519,201 @@
|
|
|
10095
10519
|
"additionalProperties": false
|
|
10096
10520
|
}
|
|
10097
10521
|
},
|
|
10522
|
+
{
|
|
10523
|
+
"name": "harden_firewall",
|
|
10524
|
+
"title": "Harden Firewall (Security Shield)",
|
|
10525
|
+
"risk": "dangerous",
|
|
10526
|
+
"annotations": {
|
|
10527
|
+
"destructiveHint": true,
|
|
10528
|
+
"openWorldHint": false
|
|
10529
|
+
},
|
|
10530
|
+
"description": "Hardens the IPv4 firewall against common attacks by applying a chosen set of best-practice rules (DDoS/connection-rate, SSH/Winbox brute-force ladder, SYN-flood and ICMP rate limits, port-scan detection, anti-spoof/bogon, raw pre-conntrack drops, management lock-down). Pick a `preset` (basic · standard · paranoid) and/or toggle individual `protections`. DEFAULTS TO A DRY RUN (`apply=false`) that returns the exact commands grouped by protection. Applying defaults to SAFE MODE (`safe_mode=true`) so a rule that cuts your own access auto-reverts. Anti-lockout: set `trusted_sources` (an address or address-list always accepted first); input-drop protections are refused without it unless `i_accept_lockout_risk=true`. Every rule is tagged with a 'security-shield:' comment — audit with audit_firewall_hardening, undo with remove_firewall_hardening. Rules are appended; review order for an existing ruleset.",
|
|
10531
|
+
"inputSchema": {
|
|
10532
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10533
|
+
"type": "object",
|
|
10534
|
+
"properties": {
|
|
10535
|
+
"preset": {
|
|
10536
|
+
"default": "standard",
|
|
10537
|
+
"description": "Bundle to apply; 'custom' uses only the `protections` toggles",
|
|
10538
|
+
"type": "string",
|
|
10539
|
+
"enum": ["basic", "standard", "paranoid", "custom"]
|
|
10540
|
+
},
|
|
10541
|
+
"protections": {
|
|
10542
|
+
"description": "Per-protection on/off, overriding/extending the preset",
|
|
10543
|
+
"type": "object",
|
|
10544
|
+
"propertyNames": {
|
|
10545
|
+
"type": "string",
|
|
10546
|
+
"enum": [
|
|
10547
|
+
"state_hygiene",
|
|
10548
|
+
"ssh_bruteforce",
|
|
10549
|
+
"ddos_conn_limit",
|
|
10550
|
+
"syn_flood",
|
|
10551
|
+
"icmp_limit",
|
|
10552
|
+
"port_scan",
|
|
10553
|
+
"anti_spoof",
|
|
10554
|
+
"raw_drops",
|
|
10555
|
+
"mgmt_lockdown"
|
|
10556
|
+
]
|
|
10557
|
+
},
|
|
10558
|
+
"additionalProperties": {
|
|
10559
|
+
"type": "boolean"
|
|
10560
|
+
},
|
|
10561
|
+
"required": [
|
|
10562
|
+
"state_hygiene",
|
|
10563
|
+
"ssh_bruteforce",
|
|
10564
|
+
"ddos_conn_limit",
|
|
10565
|
+
"syn_flood",
|
|
10566
|
+
"icmp_limit",
|
|
10567
|
+
"port_scan",
|
|
10568
|
+
"anti_spoof",
|
|
10569
|
+
"raw_drops",
|
|
10570
|
+
"mgmt_lockdown"
|
|
10571
|
+
]
|
|
10572
|
+
},
|
|
10573
|
+
"trusted_sources": {
|
|
10574
|
+
"description": "Address or address-list name always accepted first (anti-lockout)",
|
|
10575
|
+
"type": "string"
|
|
10576
|
+
},
|
|
10577
|
+
"wan_interface": {
|
|
10578
|
+
"description": "WAN interface (required for anti_spoof)",
|
|
10579
|
+
"type": "string"
|
|
10580
|
+
},
|
|
10581
|
+
"mgmt_ports": {
|
|
10582
|
+
"default": "22,8291,8728",
|
|
10583
|
+
"description": "Management TCP ports",
|
|
10584
|
+
"type": "string"
|
|
10585
|
+
},
|
|
10586
|
+
"ssh_ports": {
|
|
10587
|
+
"default": "22",
|
|
10588
|
+
"description": "Ports watched by the brute-force ladder",
|
|
10589
|
+
"type": "string"
|
|
10590
|
+
},
|
|
10591
|
+
"conn_limit": {
|
|
10592
|
+
"default": 100,
|
|
10593
|
+
"description": "Per-source TCP connection cap",
|
|
10594
|
+
"type": "integer",
|
|
10595
|
+
"minimum": -9007199254740991,
|
|
10596
|
+
"maximum": 9007199254740991
|
|
10597
|
+
},
|
|
10598
|
+
"syn_rate": {
|
|
10599
|
+
"default": "200,50:packet",
|
|
10600
|
+
"type": "string"
|
|
10601
|
+
},
|
|
10602
|
+
"icmp_rate": {
|
|
10603
|
+
"default": "50,10:packet",
|
|
10604
|
+
"type": "string"
|
|
10605
|
+
},
|
|
10606
|
+
"apply": {
|
|
10607
|
+
"default": false,
|
|
10608
|
+
"description": "false = preview only (default); true = apply",
|
|
10609
|
+
"type": "boolean"
|
|
10610
|
+
},
|
|
10611
|
+
"safe_mode": {
|
|
10612
|
+
"default": true,
|
|
10613
|
+
"description": "Apply through Safe Mode (auto-revert on lockout)",
|
|
10614
|
+
"type": "boolean"
|
|
10615
|
+
},
|
|
10616
|
+
"i_accept_lockout_risk": {
|
|
10617
|
+
"default": false,
|
|
10618
|
+
"type": "boolean"
|
|
10619
|
+
}
|
|
10620
|
+
},
|
|
10621
|
+
"required": [
|
|
10622
|
+
"preset",
|
|
10623
|
+
"mgmt_ports",
|
|
10624
|
+
"ssh_ports",
|
|
10625
|
+
"conn_limit",
|
|
10626
|
+
"syn_rate",
|
|
10627
|
+
"icmp_rate",
|
|
10628
|
+
"apply",
|
|
10629
|
+
"safe_mode",
|
|
10630
|
+
"i_accept_lockout_risk"
|
|
10631
|
+
],
|
|
10632
|
+
"additionalProperties": false
|
|
10633
|
+
}
|
|
10634
|
+
},
|
|
10635
|
+
{
|
|
10636
|
+
"name": "audit_firewall_hardening",
|
|
10637
|
+
"title": "Audit Firewall Hardening",
|
|
10638
|
+
"risk": "read",
|
|
10639
|
+
"annotations": {
|
|
10640
|
+
"readOnlyHint": true,
|
|
10641
|
+
"idempotentHint": true,
|
|
10642
|
+
"openWorldHint": false
|
|
10643
|
+
},
|
|
10644
|
+
"description": "Reports which Security Shield protections are present on the firewall by scanning for the 'security-shield:' tagged rules (`/ip firewall filter` + `/ip firewall raw`), and notes the foundational checks (accept established/related, drop invalid) regardless of tag. Use to see coverage and gaps before/after harden_firewall. Complements the broader firewall-audit tools. Returns a per-protection present/absent summary.",
|
|
10645
|
+
"inputSchema": {
|
|
10646
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10647
|
+
"type": "object",
|
|
10648
|
+
"properties": {},
|
|
10649
|
+
"additionalProperties": false
|
|
10650
|
+
}
|
|
10651
|
+
},
|
|
10652
|
+
{
|
|
10653
|
+
"name": "remove_firewall_hardening",
|
|
10654
|
+
"title": "Remove Firewall Hardening",
|
|
10655
|
+
"risk": "destructive",
|
|
10656
|
+
"annotations": {
|
|
10657
|
+
"destructiveHint": true,
|
|
10658
|
+
"idempotentHint": true,
|
|
10659
|
+
"openWorldHint": false
|
|
10660
|
+
},
|
|
10661
|
+
"description": "Removes every firewall rule that Security Shield installed — all `/ip firewall filter` and `/ip firewall raw` entries tagged with the 'security-shield:' comment (the shield's own address-lists are left, since they may be referenced elsewhere). Use to roll back harden_firewall. Does NOT touch rules you created by hand. Returns how many rules were removed.",
|
|
10662
|
+
"inputSchema": {
|
|
10663
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10664
|
+
"type": "object",
|
|
10665
|
+
"properties": {},
|
|
10666
|
+
"additionalProperties": false
|
|
10667
|
+
}
|
|
10668
|
+
},
|
|
10669
|
+
{
|
|
10670
|
+
"name": "setup_port_knock",
|
|
10671
|
+
"title": "Set Up Port-Knock Guardian",
|
|
10672
|
+
"risk": "dangerous",
|
|
10673
|
+
"annotations": {
|
|
10674
|
+
"destructiveHint": true,
|
|
10675
|
+
"openWorldHint": false
|
|
10676
|
+
},
|
|
10677
|
+
"description": "Hides management services behind a secret port-knock `sequence`: a source must connect to the knock ports in order to be added to an allow-list, after which the `protect_ports` (SSH/Winbox/API, default 22,8291,8728) accept it — everyone else is dropped, so the ports are invisible to scanners. Generates the staged address-list ladder + accept/drop rules. DEFAULTS TO A DRY RUN (`apply=false`); set `apply=true` to install. WARNING: after applying, management is only reachable by knocking the exact sequence — make sure you can knock (and keep a console/trusted path). Rules are tagged 'port-knock:'. Returns the plan or a build report.",
|
|
10678
|
+
"inputSchema": {
|
|
10679
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10680
|
+
"type": "object",
|
|
10681
|
+
"properties": {
|
|
10682
|
+
"sequence": {
|
|
10683
|
+
"minItems": 2,
|
|
10684
|
+
"type": "array",
|
|
10685
|
+
"items": {
|
|
10686
|
+
"type": "integer",
|
|
10687
|
+
"minimum": 1,
|
|
10688
|
+
"maximum": 65535
|
|
10689
|
+
},
|
|
10690
|
+
"description": "Secret knock ports, in order, e.g. [7001, 8002, 9003]"
|
|
10691
|
+
},
|
|
10692
|
+
"protect_ports": {
|
|
10693
|
+
"default": "22,8291,8728",
|
|
10694
|
+
"description": "Management ports to hide",
|
|
10695
|
+
"type": "string"
|
|
10696
|
+
},
|
|
10697
|
+
"open_timeout": {
|
|
10698
|
+
"default": "1h",
|
|
10699
|
+
"description": "How long access stays open after the knock",
|
|
10700
|
+
"type": "string"
|
|
10701
|
+
},
|
|
10702
|
+
"stage_timeout": {
|
|
10703
|
+
"default": "10s",
|
|
10704
|
+
"description": "Allowed window between consecutive knocks",
|
|
10705
|
+
"type": "string"
|
|
10706
|
+
},
|
|
10707
|
+
"apply": {
|
|
10708
|
+
"default": false,
|
|
10709
|
+
"description": "false = preview (default); true = install",
|
|
10710
|
+
"type": "boolean"
|
|
10711
|
+
}
|
|
10712
|
+
},
|
|
10713
|
+
"required": ["sequence", "protect_ports", "open_timeout", "stage_timeout", "apply"],
|
|
10714
|
+
"additionalProperties": false
|
|
10715
|
+
}
|
|
10716
|
+
},
|
|
10098
10717
|
{
|
|
10099
10718
|
"name": "list_certificates",
|
|
10100
10719
|
"title": "List Certificates",
|
|
@@ -10222,54 +10841,102 @@
|
|
|
10222
10841
|
}
|
|
10223
10842
|
},
|
|
10224
10843
|
{
|
|
10225
|
-
"name": "remove_certificate",
|
|
10226
|
-
"title": "Remove Certificate",
|
|
10227
|
-
"risk": "destructive",
|
|
10844
|
+
"name": "remove_certificate",
|
|
10845
|
+
"title": "Remove Certificate",
|
|
10846
|
+
"risk": "destructive",
|
|
10847
|
+
"annotations": {
|
|
10848
|
+
"destructiveHint": true,
|
|
10849
|
+
"idempotentHint": true,
|
|
10850
|
+
"openWorldHint": false
|
|
10851
|
+
},
|
|
10852
|
+
"description": "Permanently deletes a named certificate from the device store (`/certificate remove [find name=...]`). Performs an existence check first and returns an error if the certificate is not found. Removing a CA certificate will invalidate any leaf certificates it signed. Use `list_certificates` to browse certificate names before removal.",
|
|
10853
|
+
"inputSchema": {
|
|
10854
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10855
|
+
"type": "object",
|
|
10856
|
+
"properties": {
|
|
10857
|
+
"name": {
|
|
10858
|
+
"type": "string"
|
|
10859
|
+
}
|
|
10860
|
+
},
|
|
10861
|
+
"required": ["name"],
|
|
10862
|
+
"additionalProperties": false
|
|
10863
|
+
}
|
|
10864
|
+
},
|
|
10865
|
+
{
|
|
10866
|
+
"name": "import_certificate",
|
|
10867
|
+
"title": "Import Certificate from File",
|
|
10868
|
+
"risk": "write",
|
|
10869
|
+
"annotations": {
|
|
10870
|
+
"destructiveHint": false,
|
|
10871
|
+
"openWorldHint": false
|
|
10872
|
+
},
|
|
10873
|
+
"description": "Imports a certificate or private key from a file already present on the device filesystem (`/certificate import`). Use when you have uploaded a PEM, DER, or PKCS12 file to the device via FTP/SCP/Winbox and need to register it in the certificate store. Supply `passphrase` if the key is encrypted, and `name` to label the imported entry in the store. To generate a certificate locally on the device instead use `create_certificate` followed by `sign_certificate`.",
|
|
10874
|
+
"inputSchema": {
|
|
10875
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10876
|
+
"type": "object",
|
|
10877
|
+
"properties": {
|
|
10878
|
+
"file_name": {
|
|
10879
|
+
"type": "string",
|
|
10880
|
+
"description": "Name of the certificate/key file to import"
|
|
10881
|
+
},
|
|
10882
|
+
"passphrase": {
|
|
10883
|
+
"description": "Passphrase protecting the imported key, if any",
|
|
10884
|
+
"type": "string"
|
|
10885
|
+
},
|
|
10886
|
+
"name": {
|
|
10887
|
+
"description": "Name to assign to the imported certificate",
|
|
10888
|
+
"type": "string"
|
|
10889
|
+
}
|
|
10890
|
+
},
|
|
10891
|
+
"required": ["file_name"],
|
|
10892
|
+
"additionalProperties": false
|
|
10893
|
+
}
|
|
10894
|
+
},
|
|
10895
|
+
{
|
|
10896
|
+
"name": "audit_certificate_expiry",
|
|
10897
|
+
"title": "Audit Certificate Expiry",
|
|
10898
|
+
"risk": "read",
|
|
10228
10899
|
"annotations": {
|
|
10229
|
-
"
|
|
10900
|
+
"readOnlyHint": true,
|
|
10230
10901
|
"idempotentHint": true,
|
|
10231
10902
|
"openWorldHint": false
|
|
10232
10903
|
},
|
|
10233
|
-
"description": "
|
|
10904
|
+
"description": "Scans every certificate in the device store (`/certificate print detail`) and reports how long until each one expires — sorted by urgency, with anything ALREADY EXPIRED or expiring within `warn_within_days` (default 30) flagged first. Use this to catch a TLS cert (SSTP, API-SSL, hotspot, REST/www-ssl) before it lapses and silently breaks a service. For the full detail of one certificate use get_certificate; to obtain/renew a Let's Encrypt cert use request_letsencrypt_certificate. Returns a grouped report (expired · expiring soon · ok), plus any certs with no parseable expiry (e.g. unsigned templates).",
|
|
10234
10905
|
"inputSchema": {
|
|
10235
10906
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10236
10907
|
"type": "object",
|
|
10237
10908
|
"properties": {
|
|
10238
|
-
"
|
|
10239
|
-
"
|
|
10909
|
+
"warn_within_days": {
|
|
10910
|
+
"default": 30,
|
|
10911
|
+
"description": "Flag certificates expiring within this many days as 'expiring soon'",
|
|
10912
|
+
"type": "integer",
|
|
10913
|
+
"minimum": -9007199254740991,
|
|
10914
|
+
"maximum": 9007199254740991
|
|
10240
10915
|
}
|
|
10241
10916
|
},
|
|
10242
|
-
"required": ["
|
|
10917
|
+
"required": ["warn_within_days"],
|
|
10243
10918
|
"additionalProperties": false
|
|
10244
10919
|
}
|
|
10245
10920
|
},
|
|
10246
10921
|
{
|
|
10247
|
-
"name": "
|
|
10248
|
-
"title": "
|
|
10922
|
+
"name": "request_letsencrypt_certificate",
|
|
10923
|
+
"title": "Request/Renew Let's Encrypt Certificate",
|
|
10249
10924
|
"risk": "write",
|
|
10250
10925
|
"annotations": {
|
|
10251
10926
|
"destructiveHint": false,
|
|
10252
10927
|
"openWorldHint": false
|
|
10253
10928
|
},
|
|
10254
|
-
"description": "
|
|
10929
|
+
"description": "Obtains (or renews) a free Let's Encrypt TLS certificate for `dns_name` using RouterOS's built-in ACME client (`/certificate enable-ssl-certificate`). The device must be reachable from the internet on TCP 80 and `dns_name` must already resolve to it (ACME http-01 challenge). On success the certificate is installed in the store and bound to the www-ssl service; re-running this for the same name renews it. To check what is installed and when it expires use audit_certificate_expiry. NOTE: this reaches the public ACME service and may take several seconds. Returns the device's output from the request.",
|
|
10255
10930
|
"inputSchema": {
|
|
10256
10931
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10257
10932
|
"type": "object",
|
|
10258
10933
|
"properties": {
|
|
10259
|
-
"
|
|
10934
|
+
"dns_name": {
|
|
10260
10935
|
"type": "string",
|
|
10261
|
-
"description": "
|
|
10262
|
-
},
|
|
10263
|
-
"passphrase": {
|
|
10264
|
-
"description": "Passphrase protecting the imported key, if any",
|
|
10265
|
-
"type": "string"
|
|
10266
|
-
},
|
|
10267
|
-
"name": {
|
|
10268
|
-
"description": "Name to assign to the imported certificate",
|
|
10269
|
-
"type": "string"
|
|
10936
|
+
"description": "Public DNS name that resolves to this router, e.g. 'vpn.example.com'"
|
|
10270
10937
|
}
|
|
10271
10938
|
},
|
|
10272
|
-
"required": ["
|
|
10939
|
+
"required": ["dns_name"],
|
|
10273
10940
|
"additionalProperties": false
|
|
10274
10941
|
}
|
|
10275
10942
|
},
|
|
@@ -11229,6 +11896,165 @@
|
|
|
11229
11896
|
"additionalProperties": false
|
|
11230
11897
|
}
|
|
11231
11898
|
},
|
|
11899
|
+
{
|
|
11900
|
+
"name": "build_wireguard_mesh",
|
|
11901
|
+
"title": "Build WireGuard Mesh / Hub-Spoke VPN",
|
|
11902
|
+
"risk": "dangerous",
|
|
11903
|
+
"annotations": {
|
|
11904
|
+
"destructiveHint": true,
|
|
11905
|
+
"openWorldHint": false
|
|
11906
|
+
},
|
|
11907
|
+
"description": "Stands up a WireGuard VPN across several configured devices in ONE call: ensures a WireGuard interface on each, reads each device's public key, assigns every device a mesh address from `address_prefix`, then wires the peers between routers — `topology=full-mesh` connects every pair, `hub-spoke` connects the `hub` to each spoke — distributing public keys automatically. Endpoints default to each device's configured host (override per device via `endpoints`); add each site's LAN subnet via `allowed_lans` to route it through the tunnel. DEFAULTS TO A DRY RUN (`apply=false`) that shows the full plan; set `apply=true` to build it. Operates across MULTIPLE devices, so it is not affected by the single `device` selector. SSH devices only (needs to read public keys). Returns the plan, or a per-device build report.",
|
|
11908
|
+
"inputSchema": {
|
|
11909
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
11910
|
+
"type": "object",
|
|
11911
|
+
"properties": {
|
|
11912
|
+
"devices": {
|
|
11913
|
+
"minItems": 2,
|
|
11914
|
+
"type": "array",
|
|
11915
|
+
"items": {
|
|
11916
|
+
"type": "string"
|
|
11917
|
+
},
|
|
11918
|
+
"description": "Configured device names to include in the mesh (2+)"
|
|
11919
|
+
},
|
|
11920
|
+
"address_prefix": {
|
|
11921
|
+
"default": "10.20.0.0/24",
|
|
11922
|
+
"description": "Mesh subnet; each device gets <prefix>.<index+1> on its WireGuard interface",
|
|
11923
|
+
"type": "string"
|
|
11924
|
+
},
|
|
11925
|
+
"interface": {
|
|
11926
|
+
"default": "wg-mesh",
|
|
11927
|
+
"description": "WireGuard interface name to create/use",
|
|
11928
|
+
"type": "string"
|
|
11929
|
+
},
|
|
11930
|
+
"listen_port": {
|
|
11931
|
+
"default": 13231,
|
|
11932
|
+
"type": "integer",
|
|
11933
|
+
"minimum": -9007199254740991,
|
|
11934
|
+
"maximum": 9007199254740991
|
|
11935
|
+
},
|
|
11936
|
+
"topology": {
|
|
11937
|
+
"default": "full-mesh",
|
|
11938
|
+
"type": "string",
|
|
11939
|
+
"enum": ["full-mesh", "hub-spoke"]
|
|
11940
|
+
},
|
|
11941
|
+
"hub": {
|
|
11942
|
+
"description": "Hub device name (required when topology=hub-spoke)",
|
|
11943
|
+
"type": "string"
|
|
11944
|
+
},
|
|
11945
|
+
"endpoints": {
|
|
11946
|
+
"description": "Per-device public endpoint host override, e.g. {\"site-a\":\"a.example.com\"}",
|
|
11947
|
+
"type": "object",
|
|
11948
|
+
"propertyNames": {
|
|
11949
|
+
"type": "string"
|
|
11950
|
+
},
|
|
11951
|
+
"additionalProperties": {
|
|
11952
|
+
"type": "string"
|
|
11953
|
+
}
|
|
11954
|
+
},
|
|
11955
|
+
"allowed_lans": {
|
|
11956
|
+
"description": "Per-device LAN subnet to route through the tunnel, e.g. {\"site-a\":\"192.168.10.0/24\"}",
|
|
11957
|
+
"type": "object",
|
|
11958
|
+
"propertyNames": {
|
|
11959
|
+
"type": "string"
|
|
11960
|
+
},
|
|
11961
|
+
"additionalProperties": {
|
|
11962
|
+
"type": "string"
|
|
11963
|
+
}
|
|
11964
|
+
},
|
|
11965
|
+
"persistent_keepalive": {
|
|
11966
|
+
"default": "25s",
|
|
11967
|
+
"type": "string"
|
|
11968
|
+
},
|
|
11969
|
+
"apply": {
|
|
11970
|
+
"default": false,
|
|
11971
|
+
"description": "false = preview the plan (default); true = build",
|
|
11972
|
+
"type": "boolean"
|
|
11973
|
+
}
|
|
11974
|
+
},
|
|
11975
|
+
"required": [
|
|
11976
|
+
"devices",
|
|
11977
|
+
"address_prefix",
|
|
11978
|
+
"interface",
|
|
11979
|
+
"listen_port",
|
|
11980
|
+
"topology",
|
|
11981
|
+
"persistent_keepalive",
|
|
11982
|
+
"apply"
|
|
11983
|
+
],
|
|
11984
|
+
"additionalProperties": false
|
|
11985
|
+
}
|
|
11986
|
+
},
|
|
11987
|
+
{
|
|
11988
|
+
"name": "onboard_wireguard_user",
|
|
11989
|
+
"title": "Onboard WireGuard Remote User",
|
|
11990
|
+
"risk": "write",
|
|
11991
|
+
"annotations": {
|
|
11992
|
+
"destructiveHint": false,
|
|
11993
|
+
"openWorldHint": false
|
|
11994
|
+
},
|
|
11995
|
+
"description": "Generates a ready-to-use WireGuard remote-access profile for one user: creates a client keypair, adds the peer to the server `interface` (allowed-address = the client's tunnel IP), reads the server's public key, and returns a complete client .conf to paste into the WireGuard app or a QR generator. The peer is tagged `vpn-user: <user>` so revoke_wireguard_user can remove it. NOTE: the returned config contains the client PRIVATE key (required to connect) — handle it securely. `endpoint` is the server's public host:port; `allowed_ips` controls split vs full tunnel. SSH devices only. Returns the client config.",
|
|
11996
|
+
"inputSchema": {
|
|
11997
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
11998
|
+
"type": "object",
|
|
11999
|
+
"properties": {
|
|
12000
|
+
"interface": {
|
|
12001
|
+
"type": "string",
|
|
12002
|
+
"description": "Existing WireGuard SERVER interface, e.g. 'wg-server'"
|
|
12003
|
+
},
|
|
12004
|
+
"user": {
|
|
12005
|
+
"type": "string",
|
|
12006
|
+
"description": "User/device label, e.g. 'alice-laptop'"
|
|
12007
|
+
},
|
|
12008
|
+
"address": {
|
|
12009
|
+
"type": "string",
|
|
12010
|
+
"description": "Tunnel IP to assign the client, e.g. '10.20.0.50'"
|
|
12011
|
+
},
|
|
12012
|
+
"endpoint": {
|
|
12013
|
+
"type": "string",
|
|
12014
|
+
"description": "Server public endpoint host:port, e.g. 'vpn.example.com:13231'"
|
|
12015
|
+
},
|
|
12016
|
+
"dns": {
|
|
12017
|
+
"description": "DNS for the client, e.g. '10.20.0.1'",
|
|
12018
|
+
"type": "string"
|
|
12019
|
+
},
|
|
12020
|
+
"allowed_ips": {
|
|
12021
|
+
"default": "0.0.0.0/0",
|
|
12022
|
+
"description": "Client AllowedIPs: '0.0.0.0/0' full-tunnel, or a LAN subnet for split-tunnel",
|
|
12023
|
+
"type": "string"
|
|
12024
|
+
},
|
|
12025
|
+
"keepalive": {
|
|
12026
|
+
"default": "25",
|
|
12027
|
+
"description": "PersistentKeepalive seconds",
|
|
12028
|
+
"type": "string"
|
|
12029
|
+
}
|
|
12030
|
+
},
|
|
12031
|
+
"required": ["interface", "user", "address", "endpoint", "allowed_ips", "keepalive"],
|
|
12032
|
+
"additionalProperties": false
|
|
12033
|
+
}
|
|
12034
|
+
},
|
|
12035
|
+
{
|
|
12036
|
+
"name": "revoke_wireguard_user",
|
|
12037
|
+
"title": "Revoke WireGuard Remote User",
|
|
12038
|
+
"risk": "destructive",
|
|
12039
|
+
"annotations": {
|
|
12040
|
+
"destructiveHint": true,
|
|
12041
|
+
"idempotentHint": true,
|
|
12042
|
+
"openWorldHint": false
|
|
12043
|
+
},
|
|
12044
|
+
"description": "Revokes a remote-access user created by onboard_wireguard_user: removes the WireGuard peer tagged `vpn-user: <user>` from the server, immediately cutting their access. Returns whether a peer was removed.",
|
|
12045
|
+
"inputSchema": {
|
|
12046
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
12047
|
+
"type": "object",
|
|
12048
|
+
"properties": {
|
|
12049
|
+
"user": {
|
|
12050
|
+
"type": "string",
|
|
12051
|
+
"description": "The user label used at onboarding"
|
|
12052
|
+
}
|
|
12053
|
+
},
|
|
12054
|
+
"required": ["user"],
|
|
12055
|
+
"additionalProperties": false
|
|
12056
|
+
}
|
|
12057
|
+
},
|
|
11232
12058
|
{
|
|
11233
12059
|
"name": "create_ipsec_profile",
|
|
11234
12060
|
"title": "Create IPsec Phase-1 Profile",
|
|
@@ -15353,6 +16179,63 @@
|
|
|
15353
16179
|
"additionalProperties": false
|
|
15354
16180
|
}
|
|
15355
16181
|
},
|
|
16182
|
+
{
|
|
16183
|
+
"name": "apply_traffic_shaping",
|
|
16184
|
+
"title": "Apply Traffic-Shaping Policy",
|
|
16185
|
+
"risk": "write",
|
|
16186
|
+
"annotations": {
|
|
16187
|
+
"destructiveHint": false,
|
|
16188
|
+
"openWorldHint": false
|
|
16189
|
+
},
|
|
16190
|
+
"description": "Builds a traffic-shaping policy as a batch of `/queue simple` classes (target address, max-limit, priority) in one call — e.g. prioritize a VoIP subnet and cap a guest network. DEFAULTS TO A DRY RUN: with `apply=false` (default) it returns the exact RouterOS commands it WOULD run so the shape can be reviewed first; set `apply=true` to create the queues and verify them. Classes are created in array order, and RouterOS evaluates simple queues top-down, so list the most specific/important first. For classification by port/protocol (not address) use the firewall mangle tools to mark packets, then a queue tree. Returns the dry-run plan or the created queues.",
|
|
16191
|
+
"inputSchema": {
|
|
16192
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
16193
|
+
"type": "object",
|
|
16194
|
+
"properties": {
|
|
16195
|
+
"classes": {
|
|
16196
|
+
"minItems": 1,
|
|
16197
|
+
"type": "array",
|
|
16198
|
+
"items": {
|
|
16199
|
+
"type": "object",
|
|
16200
|
+
"properties": {
|
|
16201
|
+
"name": {
|
|
16202
|
+
"type": "string",
|
|
16203
|
+
"description": "Queue name, e.g. 'voip' or 'guest-cap'"
|
|
16204
|
+
},
|
|
16205
|
+
"target": {
|
|
16206
|
+
"type": "string",
|
|
16207
|
+
"description": "Target address/subnet this class applies to, e.g. '192.168.20.0/24'"
|
|
16208
|
+
},
|
|
16209
|
+
"max_limit": {
|
|
16210
|
+
"type": "string",
|
|
16211
|
+
"description": "RouterOS max-limit as 'upload/download', e.g. '10M/10M' (or a single value)"
|
|
16212
|
+
},
|
|
16213
|
+
"priority": {
|
|
16214
|
+
"default": 8,
|
|
16215
|
+
"description": "1 (highest) … 8 (lowest); lower number wins under contention",
|
|
16216
|
+
"type": "integer",
|
|
16217
|
+
"minimum": 1,
|
|
16218
|
+
"maximum": 8
|
|
16219
|
+
},
|
|
16220
|
+
"comment": {
|
|
16221
|
+
"type": "string"
|
|
16222
|
+
}
|
|
16223
|
+
},
|
|
16224
|
+
"required": ["name", "target", "max_limit", "priority"],
|
|
16225
|
+
"additionalProperties": false
|
|
16226
|
+
},
|
|
16227
|
+
"description": "Shaping classes to create, in priority order"
|
|
16228
|
+
},
|
|
16229
|
+
"apply": {
|
|
16230
|
+
"default": false,
|
|
16231
|
+
"description": "false = preview the commands only (default); true = create the queues",
|
|
16232
|
+
"type": "boolean"
|
|
16233
|
+
}
|
|
16234
|
+
},
|
|
16235
|
+
"required": ["classes", "apply"],
|
|
16236
|
+
"additionalProperties": false
|
|
16237
|
+
}
|
|
16238
|
+
},
|
|
15356
16239
|
{
|
|
15357
16240
|
"name": "list_queue_interfaces",
|
|
15358
16241
|
"title": "List Queue Interface Assignments",
|
|
@@ -17997,6 +18880,39 @@
|
|
|
17997
18880
|
"additionalProperties": false
|
|
17998
18881
|
}
|
|
17999
18882
|
},
|
|
18883
|
+
{
|
|
18884
|
+
"name": "forecast_link_saturation",
|
|
18885
|
+
"title": "Forecast Link Saturation",
|
|
18886
|
+
"risk": "read",
|
|
18887
|
+
"annotations": {
|
|
18888
|
+
"readOnlyHint": true,
|
|
18889
|
+
"idempotentHint": true,
|
|
18890
|
+
"openWorldHint": false
|
|
18891
|
+
},
|
|
18892
|
+
"description": "Estimates when an interface will saturate. Samples its current throughput (`/interface monitor-traffic ... once`), computes utilization against `capacity_mbps` (the link's rated speed), and projects the trend forward at `monthly_growth_pct` to a saturation date. Note: this is a single live sample projected at an ASSUMED growth rate — feed a realistic growth figure (or watch the trend over time) for a better forecast. Returns current load, utilization, and the projected days/date to saturation.",
|
|
18893
|
+
"inputSchema": {
|
|
18894
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18895
|
+
"type": "object",
|
|
18896
|
+
"properties": {
|
|
18897
|
+
"interface": {
|
|
18898
|
+
"type": "string",
|
|
18899
|
+
"description": "Interface to sample, e.g. 'ether1-wan'"
|
|
18900
|
+
},
|
|
18901
|
+
"capacity_mbps": {
|
|
18902
|
+
"default": 1000,
|
|
18903
|
+
"description": "Link rated speed in Mbit/s (e.g. 1000 for gig)",
|
|
18904
|
+
"type": "number"
|
|
18905
|
+
},
|
|
18906
|
+
"monthly_growth_pct": {
|
|
18907
|
+
"default": 10,
|
|
18908
|
+
"description": "Assumed month-over-month traffic growth %",
|
|
18909
|
+
"type": "number"
|
|
18910
|
+
}
|
|
18911
|
+
},
|
|
18912
|
+
"required": ["interface", "capacity_mbps", "monthly_growth_pct"],
|
|
18913
|
+
"additionalProperties": false
|
|
18914
|
+
}
|
|
18915
|
+
},
|
|
18000
18916
|
{
|
|
18001
18917
|
"name": "wake_on_lan",
|
|
18002
18918
|
"title": "Send Wake-on-LAN Magic Packet",
|
|
@@ -18277,6 +19193,75 @@
|
|
|
18277
19193
|
"additionalProperties": false
|
|
18278
19194
|
}
|
|
18279
19195
|
},
|
|
19196
|
+
{
|
|
19197
|
+
"name": "subscribe_threat_feed",
|
|
19198
|
+
"title": "Subscribe to Threat-Intel Feed",
|
|
19199
|
+
"risk": "write",
|
|
19200
|
+
"annotations": {
|
|
19201
|
+
"destructiveHint": false,
|
|
19202
|
+
"openWorldHint": false
|
|
19203
|
+
},
|
|
19204
|
+
"description": "Subscribes the router to an external threat-intelligence IP feed: installs a `/system script` that fetches `url` and imports it into the `address_list`, a `/system scheduler` that re-runs it every `interval`, and (when `drop=true`) a raw pre-conntrack drop for that list — a self-updating blocklist (e.g. Spamhaus DROP, tor exit nodes, your own deny list). `url` MUST point to a RouterOS `.rsc` file that populates the address-list. DEFAULTS TO A DRY RUN (`apply=false`); set `apply=true` to install. Script/scheduler/rule are named/tagged `threat-feed-<name>` so remove_threat_feed can undo them. Returns the plan or a build report.",
|
|
19205
|
+
"inputSchema": {
|
|
19206
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19207
|
+
"type": "object",
|
|
19208
|
+
"properties": {
|
|
19209
|
+
"name": {
|
|
19210
|
+
"type": "string",
|
|
19211
|
+
"description": "Short feed id, e.g. 'spamhaus-drop'"
|
|
19212
|
+
},
|
|
19213
|
+
"url": {
|
|
19214
|
+
"type": "string",
|
|
19215
|
+
"description": "HTTPS URL of a RouterOS .rsc address-list file"
|
|
19216
|
+
},
|
|
19217
|
+
"address_list": {
|
|
19218
|
+
"default": "threat-blocklist",
|
|
19219
|
+
"description": "Address-list to populate",
|
|
19220
|
+
"type": "string"
|
|
19221
|
+
},
|
|
19222
|
+
"interval": {
|
|
19223
|
+
"default": "1h",
|
|
19224
|
+
"description": "How often to refresh the feed",
|
|
19225
|
+
"type": "string"
|
|
19226
|
+
},
|
|
19227
|
+
"drop": {
|
|
19228
|
+
"default": true,
|
|
19229
|
+
"description": "Also add a raw drop rule for the address-list",
|
|
19230
|
+
"type": "boolean"
|
|
19231
|
+
},
|
|
19232
|
+
"apply": {
|
|
19233
|
+
"default": false,
|
|
19234
|
+
"description": "false = preview (default); true = install",
|
|
19235
|
+
"type": "boolean"
|
|
19236
|
+
}
|
|
19237
|
+
},
|
|
19238
|
+
"required": ["name", "url", "address_list", "interval", "drop", "apply"],
|
|
19239
|
+
"additionalProperties": false
|
|
19240
|
+
}
|
|
19241
|
+
},
|
|
19242
|
+
{
|
|
19243
|
+
"name": "remove_threat_feed",
|
|
19244
|
+
"title": "Remove Threat-Intel Feed",
|
|
19245
|
+
"risk": "destructive",
|
|
19246
|
+
"annotations": {
|
|
19247
|
+
"destructiveHint": true,
|
|
19248
|
+
"idempotentHint": true,
|
|
19249
|
+
"openWorldHint": false
|
|
19250
|
+
},
|
|
19251
|
+
"description": "Removes a threat feed installed by subscribe_threat_feed: deletes its `/system scheduler` and `/system script` (named `threat-feed-<name>`) and any raw drop rule tagged for it. Does NOT flush the address-list entries themselves. Returns what was removed.",
|
|
19252
|
+
"inputSchema": {
|
|
19253
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19254
|
+
"type": "object",
|
|
19255
|
+
"properties": {
|
|
19256
|
+
"name": {
|
|
19257
|
+
"type": "string",
|
|
19258
|
+
"description": "The feed id used when subscribing"
|
|
19259
|
+
}
|
|
19260
|
+
},
|
|
19261
|
+
"required": ["name"],
|
|
19262
|
+
"additionalProperties": false
|
|
19263
|
+
}
|
|
19264
|
+
},
|
|
18280
19265
|
{
|
|
18281
19266
|
"name": "add_user",
|
|
18282
19267
|
"title": "Add Local User Account",
|
|
@@ -20119,6 +21104,48 @@
|
|
|
20119
21104
|
"additionalProperties": false
|
|
20120
21105
|
}
|
|
20121
21106
|
},
|
|
21107
|
+
{
|
|
21108
|
+
"name": "run_failover_drill",
|
|
21109
|
+
"title": "Run Failover DR Drill",
|
|
21110
|
+
"risk": "dangerous",
|
|
21111
|
+
"annotations": {
|
|
21112
|
+
"destructiveHint": true,
|
|
21113
|
+
"openWorldHint": false
|
|
21114
|
+
},
|
|
21115
|
+
"description": "Rehearses a disaster safely: INSIDE SAFE MODE it disables a target (a WAN/tunnel interface, or a route), pings `verify_host` to check the backup path actually carries traffic, then ROLLS BACK — Safe Mode auto-reverts, so the change is never committed. Proves your failover works without a real outage. Requires `confirm=true` to run (it briefly disrupts traffic on the target); with confirm=false it just describes the drill. SSH-only (Safe Mode is unavailable on MAC-Telnet). Returns whether connectivity held during the simulated failure.",
|
|
21116
|
+
"inputSchema": {
|
|
21117
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
21118
|
+
"type": "object",
|
|
21119
|
+
"properties": {
|
|
21120
|
+
"target_type": {
|
|
21121
|
+
"default": "interface",
|
|
21122
|
+
"type": "string",
|
|
21123
|
+
"enum": ["interface", "route"]
|
|
21124
|
+
},
|
|
21125
|
+
"target": {
|
|
21126
|
+
"type": "string",
|
|
21127
|
+
"description": "Interface name (e.g. 'ether1-wan') or, for route, a find expression / .id"
|
|
21128
|
+
},
|
|
21129
|
+
"verify_host": {
|
|
21130
|
+
"type": "string",
|
|
21131
|
+
"description": "Host to ping during the outage to confirm the backup path, e.g. '8.8.8.8'"
|
|
21132
|
+
},
|
|
21133
|
+
"ping_count": {
|
|
21134
|
+
"default": 5,
|
|
21135
|
+
"type": "integer",
|
|
21136
|
+
"minimum": 1,
|
|
21137
|
+
"maximum": 50
|
|
21138
|
+
},
|
|
21139
|
+
"confirm": {
|
|
21140
|
+
"default": false,
|
|
21141
|
+
"description": "Must be true to actually run the drill",
|
|
21142
|
+
"type": "boolean"
|
|
21143
|
+
}
|
|
21144
|
+
},
|
|
21145
|
+
"required": ["target_type", "target", "verify_host", "ping_count", "confirm"],
|
|
21146
|
+
"additionalProperties": false
|
|
21147
|
+
}
|
|
21148
|
+
},
|
|
20122
21149
|
{
|
|
20123
21150
|
"name": "plan_changes",
|
|
20124
21151
|
"title": "Plan RouterOS Changes (Dry-Run Preview)",
|