We need firewall technology because of the nature of the Internet protocols. Security service provided by nearly all firewalls function using three fundamental methods of operation. There are also two other security services concerning encryption that are part of these systems providing five total services. The encryption services are Encrypted Authentication and Encrypted Tunnels. Filters implemented inside routers or firewall computers prevent unwanted packets from reaching the computer or network.
Filters generally act out three rules.
The first action drops inbound connection attempts and allows outbound connection attempts to go through. The second action eliminates TCP packets bound for ports that should not be available to the Internet and allows packets that should to pass. Filters specify exactly which server or machine a specific packet should go to by specifying the exact port for the intended use. Filters restrict inbound access to certain IP ranges. Filters can be from the simple to the very sophisticated, using algorithms to examine all states of all connections, looking for signs of hacking, source routing, ICMP redirection, and IP spoofing.