Skip to content

Workflow question #66

@drnasin

Description

@drnasin

Hi guys. I am a full blooded PHP dev but I suck at mikrotik stuff. I have a task to do the following

"Add 2 rules. Make sure they are inserted (or moved afterwards) before a rule that has a comment "Block access to internet")
I have no idea how to do that using UTIL class.

I can add rules. My problem is how to insert them or move them afterwards before the stated rule..

            $additionalRule = [];
            if($fw_rules_comment === 'Allow Teamviewer') {
                $additionalRule = $insertRule;
                $additionalRule['protocol'] = 'udp';
            }

            $insertRuleID = $util->add($insertRule);

            if(count($additionalRule)) {
                $additionalRuleID = $util->add($additionalRule);
            }

//make sure both rules are added or moved afterwards BEFORE the rule that has comment "Block access to internet"

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions