This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to edit packetfilter rules with PowerShell?

I am trying to create a script, that can switch on/off a specific packetfilter rule in the Sophos UTM.

I already have a script that shows me a list of the rules, but I still have no idea how to edit them.

Does anyone maybe already have a script to share?



This thread was automatically locked due to age.
Parents
  • You can do this with cc

    Show Firewall Rules objects

    su -

    cc

    packetfilter

    rules@

    press TAB to see the objects

    ---

    show the settings:

    OBJS

    REF_xxxxxxxx

    ---

    turn the rule on

    cc change_object REF_xxxxxxxx status 1

    or off

    cc change_object REF_xxxxxxxx status 0

     

     

     

     

     

     

     

Reply
  • You can do this with cc

    Show Firewall Rules objects

    su -

    cc

    packetfilter

    rules@

    press TAB to see the objects

    ---

    show the settings:

    OBJS

    REF_xxxxxxxx

    ---

    turn the rule on

    cc change_object REF_xxxxxxxx status 1

    or off

    cc change_object REF_xxxxxxxx status 0

     

     

     

     

     

     

     

Children