5 Replies Latest reply: Aug 14, 2014 4:26 PM by jdepriest RSS

    IP-list import in MWG with comments not posssible?

    Troja

      Hi all,

      we are changing from Microsoft ISA to MWG. On ISA there are many lists with IP-adresses an with a comment why the IP is excluded from something.

      This list can be exported in this way

       

      IP;Comment

       

      When importing such a list into MWG only the IP-adresses can be imported, NOT the comment. In my case we want to import several lists with more than thousand entries.

       

      Has anyone an idea how an IP list can be imported including comments?

       

      Cheers,

      Thorsten

        • 1. Re: IP-list import in MWG with comments not posssible?
          feickholt

          We had the same problem. We tried to reimport our lists defined in our BlueCoat environement. We had also serveral comment to  import

          We used the following way. We wrote 2 lines in the list manually, exported it. You will get an XML File.

          You can use this format as template to generate a file filled with your values. I used a litte AWK Script to convert a ;-separated file into the

          xml format.

          Now you can add this file using append from file. Not really self-explaining, but it worked for us.

           

          Frank

           

          Nachricht geändert durch feickholt on 18.04.13 06:47:54 CDT
          • 2. Re: IP-list import in MWG with comments not posssible?
            Troja

            Hi Frank,

            thanks for the information. This was also one possible way i thought about. :-)

            Hmmm, do you have a tool or a script to for generating the XML File?

            Cheers,

            Thorsten

            • 3. Re: IP-list import in MWG with comments not posssible?
              feickholt

              This is the awk script we used

              list2xml.awk

               

              BEGIN {

              FS=";";

              print "<libraryContent> <libraryObject> <name>LISTNAME</name> <version>7.2.0.3.0-13935</version> <description>Created on Fri Nov 16 12:32:13 CET

              2012</description> </libraryObject><lists><entry><string>com.scur.type.string.17105</string> \n<list version=\"1.0.3.42\" mwg-version=\"7.2.0.3

              .0-13935\" name=\"GLB_EJournal\" id=\"com.scur.type.string.17105\" typeId=\"com.scur.type.string\" classifier=\"URLs\" systemList=\"false\" stru

              cturalList=\"false\" defaultRights=\"2\">\n<description></description>\n<content>"

              }

              {

              print "<listEntry>\n  <entry>"$1"</entry>\n  <description>"$2"</description>\n</listEntry>";

              }

               

              END {

              print "</content>";

              print "</list></entry></lists>";

              print "</libraryContent>";

              }

               

              Replace the print part wihtin the BEGIN section with your actual XML definitions.

               

               

              than

               

              cat yourdata.csv | awk -f list2xml.awk > list2import.xml

              • 4. Re: IP-list import in MWG with comments not posssible?
                Troja

                Hi Frank,

                 

                perfect!!!!! :-)

                Thanks  a lot!

                 

                Cheers,

                Thorsten

                • 5. Re: IP-list import in MWG with comments not posssible?
                  jdepriest

                  This is amazing and you are awesome.

                   

                  This is exactly what I needed.

                   

                  It's so simple once you see how it's done.