7 Replies Latest reply on Mar 7, 2018 3:20 PM by bdufresne

    Importing policy rules?

    brfrankl

      I have several policy rules that I need to create that have between 20-50 lines I have to check (lots of "ANDs" since they can be in any order).  Is there an import tool/option anywhere?  I have not been able to find one but hoping I have overlooked it.

        • Re: Importing policy rules?
          bdufresne

          What format are these policies in?  Have they been developed within a different SolarWinds instance?

            • Re: Importing policy rules?
              brfrankl

              There are not in any format from another program/export.   I would need to know what format they would need to be written in to be imported.   Right now I create them in notepad++ and copy paste line by line

               

              Would like to have some type of pseudo code, or xml file, or some format I can put this in and just import it instead of click click copy paste.  For some of the more complicated ones, since there is no ability to insert a condition in the middle, being able to export, modify and reimport is the next use case)...

               

              At the moment there are a text file like this, and I just put each line as a regex condition since order does not matter

               

              .* permit ip 10.10.1.0\/24 any

              .* permit ip 10.20.2.0\/24 any

              .* permit ip 10.30.8.0\/22 any

              .* permit ip 10.40.1.0\/24 any

              .* permit ip 10.50.1.0\/24 any

              .* permit ip 10.60.1.0\/24 any

              .* permit ip 10.70.1.0\/24 any

              .* permit ip 10.80.3.0\/24 any

              .* permit ip 192.168.0.27\/32 any

              .* permit ip 192.168.1.3\/32 any

              .* permit ip 192.168.12.17\/32 any

              .* permit ip 192.168.16.17\/32 any

              .* permit ip 192.168.28.25\/32 any

              .* permit ip 192.168.28.34\/32 any

              .* permit ip 192.168.28.79\/32 any

              .* permit ip 192.168.29.3\/32 any

              .* permit ip 192.168.3.17\/32 any

              .* permit ip 192.168.32.79\/32 any

              .* permit ip 192.168.33.3\/32 any

              .* permit ip 192.168.5.3\/32 any

              .* permit ip 192.168.60.251\/32 any

              .* permit ip 192.168.60.252\/32 any

              .* permit ip 192.168.60.63\/32 any

              .* permit ip 192.168.61.3\/32 any

              .* permit ip 192.168.64.17\/32 any

              .* permit ip 192.168.64.251\/32 any

              .* permit ip 192.168.64.252\/32 any

              .* permit ip 192.168.64.252\/32 any

              .* permit ip 192.168.80.17\/32 any

              .* permit ip 192.168.84.17\/32 any

              .* permit ip 192.168.88.17\/32 any

              .* deny ip any any log

               

               

              And here is a more complex one that I put in and had to delete and re-write several times as I got the order logic the way I wanted:

               

                • Re: Importing policy rules?
                  bdufresne

                  I remember there being a way to import compliance rules, and I believe it was XML format.  What I would do is: take one of the compliance rules you have already built and saved, export it to verify the format, and modify that to a "template" format so you can build that out from your notepad.  It would likely be best to export 2 rules with distinct titles, this way you can build out multiple rules using the XML format.

                   

                  I hope that helps, and let me know if it works for you, or if you require additional assistance!

                    • Re: Importing policy rules?
                      brfrankl

                      That is what I was thinking, but I don't see an import/export for the rules, Just the reports....

                        • Re: Importing policy rules?
                          bdufresne

                          I just took a quick look at some NCM compliance rules that I know are exported from SolarWinds, and you are right.  I was looking at the STIG compliance rules for federal, and the structure requires assigning a RuleID (GUID style number) and whatnot.  You could make those up, but it might be better to build the initial reports out.  So you could take the rules you've already created and assign them to a policy, then assign the policy to a report, and export the report.  This would generate the IDs you require for report and policy, then you just need to configure the rules.

                           

                          Does that make sense?