How to Secure Optimized Networks