Which network device monitors incoming and outgoing traffic and decides whether to allow or block specific traffic based on a defined set of rules?