Crafting Effective Network Security Policies