\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{geometry}
\geometry{top=15mm, bottom=15mm, left=1cm, right=1cm}
\usepackage[french]{babel}
\usepackage{pslatex}
\usepackage[colorlinks=true,urlcolor=black]{hyperref}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\footrulewidth}{0.4pt}
\fancyfoot[L]{Uubu.fr}
\fancyfoot[R]{dim. janv. 15 10:53:54 CET 2017}
\lfoot{\Large \textit{Uubu.fr}}
\hypersetup{pdfinfo={
Title={firewalld.zone},
Author={Sylvain Girod},
Creator={Bash script from uubu.fr's format version 1},
Producer={Bash script and PDFLaTeX},
Subject={Fichiers de configuration de zone firewalld},
CreationDate={D:20170115105354},
ModDate={D:20170115105354},
Keywords={firewall;sécurité;firewalld}
}}
\begin{document}
 
\begin{center}
{\Huge firewalld.zone }
\end{center}
\vspace{1cm}
 
\begin{flushleft}
 
{\large Fichiers de configuration de zone firewalld}
 
\vspace{10mm}
 
\hspace{1mm}  Un fichier de configuration de zone contient les informations pour une zone.
\vspace{5mm} \\
 
 
\hspace{1mm} Structure d'un fichier de configuration de zone
 
{\ttfamily
<?xml version="1.0" encoding="utf-8"?>\\ <zone \texttt{[}version="versionstring"\texttt{]} \texttt{[}target="ACCEPT|\%\%REJECT\%\%|DROP"\texttt{]}>\\ \hspace{2mm}\texttt{[} <short>short description</short> \texttt{]}\\ \hspace{2mm}\texttt{[} <description>description</description> \texttt{]}\\ \hspace{2mm}\texttt{[} <interface name="string"/> \texttt{]}\\ \hspace{2mm}\texttt{[} <source address="address\texttt{[}/mask\texttt{]}"|mac="MAC"|ipset="ipset"/> \texttt{]}\\ \hspace{2mm}\texttt{[} <service name="string"/> \texttt{]}\\ \hspace{2mm}\texttt{[} <port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp"/> \texttt{]}\\ \hspace{2mm}\texttt{[} <protcol value="protocol"/> \texttt{]}\\ \hspace{2mm}\texttt{[} <icmp-block name="string"/> \texttt{]}\\ \hspace{2mm}\texttt{[} <icmp-block-inversion/> \texttt{]}\\ \hspace{2mm}\texttt{[} <masquerade/> \texttt{]}\\ \hspace{2mm}\texttt{[} <forward-port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp" \texttt{[}to-port="portid\texttt{[}-portid\texttt{]}"\texttt{]} \texttt{[}to-addr="ipv4address"\texttt{]}/> \texttt{]}\\ \hspace{2mm}\texttt{[} <source-port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp"/> \texttt{]}\\ \hspace{2mm}\texttt{[}\\ \hspace{2mm}\hspace{2mm}<rule \texttt{[}family="ipv4|ipv6"\texttt{]}>\\ \hspace{2mm}\hspace{2mm}\texttt{[} <source address="address\texttt{[}/mask\texttt{]}"|mac="MAC"|ipset="ipset" \texttt{[}invert="True"\texttt{]}/> \texttt{]}\\ \hspace{2mm}\hspace{2mm}\texttt{[} <destination address="address\texttt{[}/mask\texttt{]}" \texttt{[}invert="True"\texttt{]}/> \texttt{]}\\ \hspace{2mm}\hspace{2mm}\texttt{[}\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<service name="string"/> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp"/> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<protocol value="protocol"/> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<icmp-block name="icmptype"/> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<masquerade/> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<forward-port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp" \texttt{[}to-port="portid\texttt{[}-portid\texttt{]}"\texttt{]} \texttt{[}to-addr="address"\texttt{]}/>\\ \hspace{2mm}\hspace{2mm}\texttt{]}\\ \hspace{2mm}\hspace{2mm}\texttt{[} <log \texttt{[}prefix="prefixtext"\texttt{]} \texttt{[}level="emerg|alert|crit|err|warn|notice|info|debug"\texttt{]}> \texttt{[}<limit value="rate/duration"/>\texttt{]} </log> \texttt{]}\\ \hspace{2mm}\hspace{2mm}\texttt{[} <audit> \texttt{[}<limit value="rate/duration"/>\texttt{]} </audit> \texttt{]}\\ \hspace{2mm}\hspace{2mm}\texttt{[}\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<accept> \texttt{[}<limit value="rate/duration"/>\texttt{]} </accept> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<reject \texttt{[}type="rejecttype"\texttt{]}> \texttt{[}<limit value="rate/duration"/>\texttt{]} </reject> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<drop> \texttt{[}<limit value="rate/duration"/>\texttt{]} </drop> |\\ \hspace{2mm}\hspace{2mm}\hspace{2mm}<mark set="mark\texttt{[}/mask\texttt{]}"> \texttt{[}<limit value="rate/duration"/>\texttt{]} </mark>\\ \hspace{2mm}\hspace{2mm}\texttt{]}\\ \hspace{2mm}\hspace{2mm}</rule>\\ \hspace{2mm}\texttt{]}\\ </zone>\\
}
\vspace{8mm}
 
\begin{description} \normalsize
\item[\hspace{1mm} zone]{définis la zone. Obligatoire et ne peut exister qu'une seule fois. Ses attributs optionnels sont:}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{6mm} version="string"]{Version de la zone}
\item[\hspace{6mm} target="ACCEPT|\%\%REJECT\%\%|DROP"]{Accèpte, rejète ou supprime tout paquets qui ne correspond à aucune règle.}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{1mm} short]{Description courte pour la zone}
\item[\hspace{1mm} description]{Description complète de la zone}
\item[\hspace{1mm} interface]{Permet de lier une interface à une zone. Peut être spécifié plusieurs fois. l'attribut name="string" spécifie le nom de l'interface.}
\item[\hspace{1mm} source]{Permet de lier une adresse source, plage d'adresse, adresse MAC ou ipset à une zone. Peut être spécifié plusieurs fois. Les attributs sont:}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{6mm} address="address\texttt{[}/mask\texttt{]}"]{IP ou réseau source.}
\item[\hspace{6mm} mac="MAC"]{Adresse MAC source}
\item[\hspace{6mm} ipset="ipset"]{ipset source}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{1mm} service]{Spécifie un service. Peut être spécifié plusieurs fois. l'argument name="string" spécifie un service à activer}
\item[\hspace{1mm} port]{Port à ajouter. Peut être spécifié plusieurs fois}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{6mm} port="portid\texttt{[}-portid\texttt{]}"]{Port ou plage de port}
\item[\hspace{6mm} protocol="tcp|udp"]{protocole à utiliser}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{1mm} protocol]{Spécifie un protocole supporté par le système. (voir /etc/protocols). Peut être spécifié plusieurs fois. l'argument value="string" spécifie le nom du protocol.}
\item[\hspace{1mm} icmp-block]{l'argument name="string est le nom d'un type ICMP (firewall-cmd --list=icmptypes pour les lister)}
\item[\hspace{1mm} icmp-block-inversion]{Inverse icmp-block}
\item[\hspace{1mm} masquerade]{IPv4 uniquement. Active le masquerading pour la zone}
\item[\hspace{1mm} forward-port]{IPv4 uniquement. Peut être spécifié plusieurs fois}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{6mm} port="portid\texttt{[}-portid\texttt{]}"]{Port ou plage de ports}
\item[\hspace{6mm} protocol="tcp|udp"]{Protocole utilisé}
\item[\hspace{6mm} to-port="portid\texttt{[}-portid\texttt{]}]{Port ou plage de port de destination}
\item[\hspace{6mm} to-addr="address"]{adresse IPv4 de destination}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{1mm} source-port]{Spécifie un port source. Peut être spécifié plusieurs fois}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{6mm} port="portid\texttt{[}-portid\texttt{]}"]{Port ou plage de ports}
\item[\hspace{6mm} protocol="tcp|udp"]{Protocole utilisé}
\end{description}
 
\begin{description} \normalsize
\item[\hspace{1mm} rule]{Définis une règle en langage rich. peut être spécifié plusieurs fois. La structure générale est:}
\end{description}
 
{\ttfamily
<rule \texttt{[}family="ipv4|ipv6"\texttt{]}>\\ \hspace{2mm}\texttt{[} <source address="address\texttt{[}/mask\texttt{]}" \texttt{[}invert="True"\texttt{]}/> \texttt{]}\\ \hspace{2mm}\texttt{[} <destination address="address\texttt{[}/mask\texttt{]}" \texttt{[}invert="True"\texttt{]}/> \texttt{]}\\ \hspace{2mm}\texttt{[}\\ \hspace{2mm}\hspace{2mm}<service name="string"/> |\\ \hspace{2mm}\hspace{2mm}<port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp"/> |\\ \hspace{2mm}\hspace{2mm}<protocol value="protocol"/> |\\ \hspace{2mm}\hspace{2mm}<icmp-block name="icmptype"/> |\\ \hspace{2mm}\hspace{2mm}<masquerade/> |\\ \hspace{2mm}\hspace{2mm}<forward-port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp" \texttt{[}to-port="portid\texttt{[}-portid\texttt{]}"\texttt{]} \texttt{[}to-addr="address"\texttt{]}/> |\\ \hspace{2mm}\hspace{2mm}<source-port port="portid\texttt{[}-portid\texttt{]}" protocol="tcp|udp"/> |\\ \hspace{2mm}\texttt{]}\\ \hspace{2mm}\texttt{[} <log \texttt{[}prefix="prefixtext"\texttt{]} \texttt{[}level="emerg|alert|crit|err|warn|notice|info|debug"\texttt{]}/> \texttt{[}<limit value="rate/duration"/>\texttt{]} </log> \texttt{]}\\ \hspace{2mm}\texttt{[} <audit> \texttt{[}<limit value="rate/duration"/>\texttt{]} </audit> \texttt{]}\\ \hspace{2mm}\texttt{[}\\ \hspace{2mm}\hspace{2mm}<accept> \texttt{[}<limit value="rate/duration"/>\texttt{]} </accept> |\\ \hspace{2mm}\hspace{2mm}<reject \texttt{[}type="rejecttype"\texttt{]}> \texttt{[}<limit value="rate/duration"/>\texttt{]} </reject> |\\ \hspace{2mm}\hspace{2mm}<drop> \texttt{[}<limit value="rate/duration"/>\texttt{]} </drop> |\\ \hspace{2mm}\hspace{2mm}<mark set="mark\texttt{[}/mask\texttt{]}"> \texttt{[}<limit value="rate/duration"/>\texttt{]} </mark>\\ \hspace{2mm}\texttt{]}\\ </rule>\\
}
\vspace{8mm}
 
\hspace{1mm} La structure de règle pour les listing black ou white source:
 
{\ttfamily
<rule \texttt{[}family="ipv4|ipv6"\texttt{]}>\\ \hspace{2mm}<source address="address\texttt{[}/mask\texttt{]}" \texttt{[}invert="True"\texttt{]}/>\\ \hspace{2mm}\texttt{[} <log \texttt{[}prefix="prefixtext"\texttt{]} \texttt{[}level="emerg|alert|crit|err|warn|notice|info|debug"\texttt{]}/> \texttt{[}<limit value="rate/duration"/>\texttt{]} </log> \texttt{]}\\ \hspace{2mm}\texttt{[} <audit> \texttt{[}<limit value="rate/duration"/>\texttt{]} </audit> \texttt{]}\\ \hspace{2mm}<accept> \texttt{[}<limit value="rate/duration"/>\texttt{]} </accept> |\\ \hspace{2mm}<reject \texttt{[}type="rejecttype"\texttt{]}> \texttt{[}<limit value="rate/duration"/>\texttt{]} </reject> |\\ \hspace{2mm}<drop> \texttt{[}<limit value="rate/duration"/>\texttt{]} </drop>\\ </rule>\\
}
\vspace{8mm}
\end{flushleft}
\end{document}
