Modeling, Validation, and Optimization of Distributed Firewalls