# netflow-hex — удаление всего, что поставил install.rsc (RouterOS 7.20+). # Данные контейнера (/nf-data) не удаляются — уберите их сами, если не нужны: # /file/remove nf-data # Запуск: /import uninstall.rsc # сначала снять правила управления и остановить исполнитель :do { /system/script/run netflow-hex-off } on-error={} /system/scheduler/remove [find name=netflow-hex-ctl] /system/script/remove [find name~"^netflow-hex-"] :foreach m in={"filter";"mangle"} do={ :if ($m = "filter") do={ /ip/firewall/filter/remove [find where comment~"^netflow-hex"] /ipv6/firewall/filter/remove [find where comment~"^netflow-hex"] } else={ /ip/firewall/mangle/remove [find where comment~"^netflow-hex"] /ipv6/firewall/mangle/remove [find where comment~"^netflow-hex"] } } /ip/firewall/address-list/remove [find where list~"^nfhex-" && comment~"^netflow-hex"] /ipv6/firewall/address-list/remove [find where list~"^nfhex-" && comment~"^netflow-hex"] /queue/tree/remove [find where comment~"^netflow-hex"] # fasttrack: connection-mark=no-mark ставил install.rsc — вернуть :foreach i in=[/ip/firewall/filter/find where action=fasttrack-connection connection-mark=no-mark] do={ /ip/firewall/filter/unset $i connection-mark } :foreach i in=[/ipv6/firewall/filter/find where action=fasttrack-connection connection-mark=no-mark] do={ /ipv6/firewall/filter/unset $i connection-mark } /ip/firewall/nat/remove [find where comment~"^netflow-hex"] :do { /ipv6/firewall/nat/remove [find where comment~"^netflow-hex"] } on-error={} /ip/dns/static/remove [find where comment~"^netflow-hex"] /ip/traffic-flow/target/remove [find where dst-address=172.17.0.2] :if ([:len [/ip/traffic-flow/target/find]] = 0) do={ /ip/traffic-flow/set enabled=no } :do { /container/stop [find name=netflow]; :delay 5s } on-error={} /container/remove [find name=netflow] /container/envs/remove [find where list=nf] /container/mounts/remove [find where list=nf-data] /snmp/community/remove [find where comment="netflow-hex"] /user/remove [find where name=netflow-hex] /user/group/remove [find where name=netflow-ro] /ip/address/remove [find where interface=veth-nf] /interface/veth/remove [find name=veth-nf] :put "netflow-hex removed. Data in nf-data is kept (delete: /file remove nf-data). Service www and disabled SNMP community public are left as is."