Guest User!

You are not Sophos Staff.

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

Script to create many rules or objects at once

Hi,

I have to migrate a Cisco ASA configuration to a Sophos UTM.
The configuration file extract from the ASA have more than 2000 lines, I wouldn't mannually create rules or objects to the UTM, it will take too many time.
So do you guys knows:
- A script which create a set of firewall rules, objects or groups and a way to import and execute it in the UTM shell
- OR a script which can convert my ASA configuration file to UTM configuration file so I can import and execute it in the shell.

Thanks!


This thread was automatically locked due to age.
  • - A script which create a set of firewall rules, objects or groups and a way to import and execute it in the UTM shell
    - OR a script which can convert my ASA configuration file to UTM configuration file so I can import and execute it in the shell.
    Neither of these things exist.  Be aware that for a paid license customer, any modification done from the shell without the express permission of Sophos Support will void your Support.

    I wouldn't mannually create rules or objects to the UTM, it will take too many time.
    This is going to be your only option I'm afraid.
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
  • I'm disappointed.
    There is no workaround?
  • Actually you could cook something up using the cc command line tool, but as stated already, such methods are not supported.  I've done it before (created a script that created objects) but with no help or support from Sophos.

    CTO, Convergent Information Security Solutions, LLC

    https://www.convergesecurity.com

    Advice given as posted on this forum does not construe a support relationship or other relationship with Convergent Information Security Solutions, LLC or its subsidiaries.  Use the advice given at your own risk.

  • Feature requests at UTM (Formerly ASG) Feature Requests: Hot (2144 ideas) (there are existing feature requests for APIs and command line automation)

    Was scripting or rule import/export a consideration in the selection/acquisition?

    What advice has your reseller/partner and support provider shared?

    It is possible.  It very likely is not supported (or worse, support negating, as Scott indicates).  The mechanisms are not documented by Sophos.  Please use your relationship with/to Sophos to encourage improvements in this area.

    Posts on this forum are probably enough do it yourself.  Many of my posts are about the command line configuration tools and methods, but I haven't shared any scripts to do the entire job for you. 
    Google, site:astaro.org teched cc
      Others have also made posts about the command line configuration.

    Depending on the firewall rules (and your requirements) it may be possible (perhaps desirable) to have less than a 1:1 ratio of ASA:UTM rules.