The network device which is capable of blocking potentially malicious network connection is called INTRUSION PREVENTION SYSTEM {IPS].
IPS works by monitoring the network traffic and by identifying and blocking potentially malicious network connections.