% Filtering Policy

In the last few years Internet communication became essential for the every day life, as at the same time network attacks and threads grow up.
Therefore network security gained high attention by, not only researcher, but also by companies and enterprises. 
This make \textit{Firewalls} a crucial security point inside the network.

A Firewall is a security network element deployed at the edge of a network that controls the traversal flows of packets in or out of the boundaries, based on a specific \textit{Filtering Policy}.\break
A Filtering policy is an ordered list of filtering rules which defines an action that must be performed on matching packets~\cite{firewall-01}.
The filtering actions are either \textit{accept}, which allow the packet to transit the firewall to or from the network, or to \textit{deny}, which causes the packet to be dropped.

There are different types of Filtering Policy.
\begin{itemize}
	\item 
	Packet filtering, it makes a packet inspection at network level, usually it checks IP headers and transport headers~\cite{packet-filter1}, in particular five header fields of the packet are analyzed which are destination and source IP address, protocol ports and protocol type.
	It is stateless, that means each packet is processed as it is, without any additional information.
	\item
	Stateful filtering~\cite{packet-filter1}, it improves the previous packet filtering functionality by maintaining an history of the connection states and sessions for the transport or application level.
	It can distinguish new connections from those already open using a state table for open connections and packets matching one row in the tables are passed without any further control.
	This type of filtering has an additional action called \textit{reject} that has the same effect of drop action, but it sends back an error message the the sending host.
	\item
	Application-level gateway, it is more powerful than stateless and stateful filtering, because it can read nested information inspecting the packet payload at application level~\cite{packet-filter1}.
	It could be used as part of a firewall, usually performs also peer authentication and the rules are more fine-grained and simple than those of a packet filter.
	\item
	Content filtering, the last one is used to block traffic for some resources based on what the packet contains, which could be a text, photos or videos.
\end{itemize}

Mostly widespread filtering are the firewall stateless, which are the frontier defense for networks against attacks and unauthorized traffic~\cite{firewall-01}.
