Writing a program for iptables configuration analysis: how to represent this in Java?

lostie

New Member
We are working on a project where we are supposed to retrieve firewall policy anomalies in an iptables configuration.It has to be a web application in Java (JSP and servlets) where a user can upload their iptables config file.We then parse this configuration and need to build a model inside our Java app.My first thought was to use the iptables-xml command to export and iptables config file to XML format and then parse this XML file in our program. But then I'm stuck. How can we best represent the rules and chains inside the app? Do we leave them in XML format or do we make objects from them?We idea is that after we have the rules in our application that we are going to search for policy anomalies with some mathematical algorithms.After that we are supposed to export the configuration back to an iptables config file. I searched the web and found that it is possible to generate a native iptables configuration from the XML config file with some XSLT file. But for that to work, we need the final configuration in XML-format.So how could we represent the rules/chains in our Java program?
 
Back
Top