How do you configure and secure a network to prevent common vulnerabilities like man-in-the-middle attacks or DDoS amplification?