1. Turn off UPnP. UPnP, or universal plug and play, is a handy feature that lets devices on your network self-configure on a network, but it's also a security hazard. ... Figure 1 Turn off UPnP in your router to stop malware on an infected computer from opening holes in the router's firewall.