What is a piece of hardware or software that reads all data packets in a network?

What is a piece of hardware or software that reads all data packets in a network?

ہارڈ ویئر یا سافٹ ویئر کا ایک ٹکڑا کیا ہے جو نیٹ ورک میں تمام ڈیٹا پیکٹ پڑھتا ہے؟
Explanation

A Firewall is a piece of hardware or software that reads all data packets in a network and blocks or allows them based on predetermined security rules.

It acts as a barrier between a trusted network and an untrusted network, such as the internet.