CYBER-SÉCURITÉ — BTS SIO SISR
🔒
🛡️

Pare-feu ZPF
Zone-Based Policy Firewall

🎓 Matière
Cyber-Sécurité
📅 Date
15 janvier 2026
🔖 Type
Procédure technique
🗂️ Zones
WAN DMZ STATIONS SERVEURS
⚙️ Plateforme
Cisco Packet Tracer – Routeur ZPF
✅ État
Terminé
📋 Table des matières
01 Objectif et principe ZPF 02 Topologie réseau 03 Plan d'adressage IP 04 Politique de sécurité – Matrice des flux 05 Configuration – Zones de sécurité 06 Configuration – Class-maps 07 Configuration – Policy-maps 08 Configuration – Zone-pairs 09 Configuration – Interfaces 10 Filtrage IP WAN → DMZ 11 Vérifications et tests 12 Configuration complète (récapitulatif) 13 Conclusion
🎯 01 Objectif et principe ZPF

Mise en situation

Ce TP a pour objectif de déployer un pare-feu ZPF (Zone-Based Policy Firewall) sur un routeur Cisco Packet Tracer. À la différence d'un pare-feu basé sur des ACL classiques, le ZPF organise les interfaces en zones de sécurité et applique des politiques de filtrage par paire de zones (zone-pair).

🔑

Principe fondamental : tout trafic entre deux zones distinctes est BLOQUÉ par défaut.

Seul le trafic explicitement autorisé dans une policy-map est permis. Le trafic intra-zone (même zone) n'est pas filtré.

Mécanismes utilisés

Flux de configuration

1

Créer les zones (zone security)

2

Définir les class-maps pour identifier les protocoles autorisés

3

Créer les policy-maps avec action inspect ou drop

4

Créer les zone-pairs et y attacher les policy-maps

5

Rattacher les interfaces à leurs zones (zone-member security)


🗺️ 02 Topologie réseau

L'infrastructure est organisée autour d'un Routeur ZPF central interconnectant quatre zones :

🌐 Zone WAN 10.0.0.0/8

PC0 (10.0.0.2)

Serveur HTTP (10.0.0.1)

Switch Sw-WAN (10.0.0.254)

Interface routeur : Fa0/0 — 10.0.0.254

🖥️ Zone DMZ 192.168.50.0/24

Serveur DMZ HTTP/DNS/SMTP (192.168.50.1)

Serveur Syslog (192.168.50.2)

Interface routeur : Fa0/3 — 192.168.50.254

💻 Zone STATIONS 192.168.2.0/24

PC0 client DHCP

PC1 client DHCP

Interface routeur : Fa0/1 — 192.168.2.254

🗄️ Zone SERVEURS 192.168.1.0/24

Serveur DHCP (192.168.1.1)

Serveur DNS (192.168.1.2)

Interface routeur : Fa0/2 — 192.168.1.254


📋 03 Plan d'adressage IP

Interfaces du Routeur ZPF

InterfaceZoneAdresse IPMasque
FastEthernet 0/0WAN10.0.0.254255.0.0.0
FastEthernet 0/1STATIONS192.168.2.254255.255.255.0
FastEthernet 0/2SERVEURS192.168.1.254255.255.255.0
FastEthernet 0/3DMZ192.168.50.254255.255.255.0

Hôtes des zones

HôteZoneIPPasserelle
Serveur DHCPSERVEURS192.168.1.1192.168.1.254
Serveur DNSSERVEURS192.168.1.2192.168.1.254
Serveur DMZ (HTTP/DNS/SMTP)DMZ192.168.50.1192.168.50.254
Serveur SyslogDMZ192.168.50.2192.168.50.254
PC0 & PC1 (clients DHCP)STATIONSVia DHCP192.168.2.254
Serveur HTTP WANWAN10.0.0.110.0.0.254

🔐 04 Politique de sécurité – Matrice des flux

Le tableau ci-dessous définit les flux autorisés. Tout flux non listé est bloqué par défaut.

Source ╲ Dest WAN DMZ STATIONS SERVEURS
WAN HTTP · DNS
SMTP · SYSLOG
(IP filtrée : .50.1)
DMZ
STATIONS HTTP · HTTPS
DNS · ICMP
HTTP · DNS
SMTP · ICMP
SYSLOG
TCP · UDP
ICMP
SERVEURS HTTP · HTTPS
DNS · ICMP
HTTP · DNS
SMTP · ICMP
SYSLOG
⚠️

Règles critiques :

• La zone DMZ ne peut PAS initier de connexion vers d'autres zones.

• L'accès WAN → DMZ est restreint à l'IP 192.168.50.1 (filtrage par ACL).

• STATIONS ne peut pas accéder à SERVEURS via HTTP/HTTPS — uniquement TCP/UDP/ICMP générique.


🏗️ 05 Configuration – Zones de sécurité

La première étape consiste à déclarer les quatre zones sur le routeur. Elles sont vides à ce stade — les interfaces y seront rattachées ultérieurement.

IOS — Création des zones
Router> enable
Router# configure terminal

! Création des 4 zones de sécurité
zone security WAN
 exit
zone security DMZ
 exit
zone security STATIONS
 exit
zone security SERVEURS
 exit
ℹ️

Le nom des zones est case-sensitive. Il doit être recopié exactement dans les class-maps, policy-maps et zone-pairs. Un écart invisible (majuscule, espace) suffit à rompre la politique.


🔍 06 Configuration – Class-maps

Les class-maps identifient les types de trafic à traiter. On utilise match-any pour autoriser dès qu'un protocole correspond (logique OR).

STATIONS → SERVEURS

IOS
class-map type inspect match-any CM-STATIONS-TO-SERVEURS
 match protocol tcp
 match protocol udp
 match protocol icmp

STATIONS & SERVEURS → DMZ

IOS
class-map type inspect match-any CM-TO-DMZ
 match protocol http
 match protocol dns
 match protocol smtp
 match protocol icmp
 match protocol syslog

STATIONS & SERVEURS → WAN

IOS
class-map type inspect match-any CM-TO-WAN
 match protocol http
 match protocol https
 match protocol dns
 match protocol icmp

WAN → DMZ (services publiés)

IOS
class-map type inspect match-any CM-WAN-TO-DMZ
 match protocol http
 match protocol dns
 match protocol smtp
 match protocol syslog
💡 match-any vs match-all — différence

match-any : le flux est identifié si au moins un protocole correspond (logique OR). C'est le mode utilisé ici.

match-all : le flux doit correspondre à tous les critères simultanément (logique AND). Rarement utilisé pour des protocoles différents.


📜 07 Configuration – Policy-maps

La policy-map associe une class-map à une action. Le mot-clé inspect autorise le trafic avec suivi de session stateful — le trafic de retour est automatiquement autorisé.

IOS — Toutes les policy-maps
! STATIONS → SERVEURS
policy-map type inspect PM-STATIONS-TO-SERVEURS
 class type inspect CM-STATIONS-TO-SERVEURS
  inspect
 class class-default
  drop

! STATIONS → DMZ
policy-map type inspect PM-STATIONS-TO-DMZ
 class type inspect CM-TO-DMZ
  inspect
 class class-default
  drop

! SERVEURS → DMZ
policy-map type inspect PM-SERVEURS-TO-DMZ
 class type inspect CM-TO-DMZ
  inspect
 class class-default
  drop

! STATIONS → WAN
policy-map type inspect PM-STATIONS-TO-WAN
 class type inspect CM-TO-WAN
  inspect
 class class-default
  drop

! SERVEURS → WAN
policy-map type inspect PM-SERVEURS-TO-WAN
 class type inspect CM-TO-WAN
  inspect
 class class-default
  drop

! WAN → DMZ
policy-map type inspect PM-WAN-TO-DMZ
 class type inspect CM-WAN-TO-DMZ
  inspect
 class class-default
  drop
ℹ️ inspect vs drop vs pass — comprendre la différence
  • inspect — autorise ET crée une entrée stateful. Le trafic retour est automatiquement géré. À utiliser pour TCP/UDP/ICMP.
  • drop — bloque silencieusement. Aucun message ICMP de rejet n'est envoyé.
  • pass — autorise sans suivi de session. Déconseillé pour TCP/UDP car le retour n'est pas automatique.

Le bloc class class-default drop est une bonne pratique : il force le drop explicite de tout ce qui ne matche pas, rendant la politique lisible.


🔗 08 Configuration – Zone-pairs

Le zone-pair définit le sens du trafic et y attache une policy-map. Chaque paire représente un flux unidirectionnel.

IOS — Tous les zone-pairs
! STATIONS → SERVEURS
zone-pair security ZP-STATIONS-TO-SERVEURS source STATIONS destination SERVEURS
 service-policy type inspect PM-STATIONS-TO-SERVEURS
 exit

! STATIONS → DMZ
zone-pair security ZP-STATIONS-TO-DMZ source STATIONS destination DMZ
 service-policy type inspect PM-STATIONS-TO-DMZ
 exit

! STATIONS → WAN
zone-pair security ZP-STATIONS-TO-WAN source STATIONS destination WAN
 service-policy type inspect PM-STATIONS-TO-WAN
 exit

! SERVEURS → DMZ
zone-pair security ZP-SERVEURS-TO-DMZ source SERVEURS destination DMZ
 service-policy type inspect PM-SERVEURS-TO-DMZ
 exit

! SERVEURS → WAN
zone-pair security ZP-SERVEURS-TO-WAN source SERVEURS destination WAN
 service-policy type inspect PM-SERVEURS-TO-WAN
 exit

! WAN → DMZ (filtrage IP ciblé sur 192.168.50.1)
zone-pair security ZP-WAN-TO-DMZ source WAN destination DMZ
 service-policy type inspect PM-WAN-TO-DMZ
 exit
⚠️

Trafic de retour : avec inspect, le retour est géré automatiquement par la table stateful. Il est inutile et incorrect de créer un zone-pair inverse uniquement pour le retour.

Ex : ZP-STATIONS-TO-WAN gère aussi le retour WAN→STATIONS pour les sessions initiées depuis STATIONS.


🔌 09 Configuration – Association des interfaces

Chaque interface physique est rattachée à sa zone via zone-member security. Une interface ne peut appartenir qu'à une seule zone.

IOS — Association interfaces → zones
interface FastEthernet0/0
 zone-member security WAN
 exit

interface FastEthernet0/1
 zone-member security STATIONS
 exit

interface FastEthernet0/2
 zone-member security SERVEURS
 exit

interface FastEthernet0/3
 zone-member security DMZ
 exit
🚫

Attention : dès qu'une interface est rattachée à une zone, tout trafic entrant/sortant est soumis au ZPF. Si aucun zone-pair ne correspond, le trafic est droppé silencieusement — même le trafic de gestion SSH/Telnet.


🎯 10 Filtrage IP WAN → DMZ

La politique impose que le WAN n'accède au serveur DMZ qu'avec un filtrage sur l'IP de destination (192.168.50.1). On utilise une ACL étendue en préfiltrage.

IOS — ACL + class-map filtrée
! ACL étendue — autorise uniquement le serveur DMZ 192.168.50.1
ip access-list extended ACL-WAN-TO-DMZ-SERVER
 permit ip any host 192.168.50.1
 deny   ip any any

! Class-map avec filtrage ACL (IOS réel)
class-map type inspect match-all CM-WAN-TO-DMZ-FILTERED
 match access-group name ACL-WAN-TO-DMZ-SERVER
📌

Note Packet Tracer : match access-group name dans une class-map de type inspect peut être partiellement supporté selon la version. Si non disponible, appliquer l'ACL directement sur l'interface WAN en entrée (ip access-group ACL-WAN-TO-DMZ-SERVER in) en complément du ZPF.


11 Vérifications et tests

Commandes de vérification

CommandeUtilité
show runVérifier l'ensemble de la configuration ZPF
show zone securityAfficher les zones et leurs interfaces membres
show zone-pair securityAfficher les zone-pairs et les policy-maps associées
show policy-map type inspect zone-pairStatistiques de trafic par policy (paquets matchés)
show class-map type inspectLister toutes les class-maps configurées
debug ip inspect eventsSuivi des sessions ZPF en temps réel ⚠️

Scénarios de test

TestActionRésultatZone-pair
STATIONS → Serveur HTTP DMZ Ping + HTTP vers 192.168.50.1 ✅ Autorisé ZP-STATIONS-TO-DMZ
STATIONS → WAN HTTP HTTP vers 10.0.0.1 ✅ Autorisé ZP-STATIONS-TO-WAN
STATIONS → Serveur DNS DNS vers 192.168.1.2 ✅ Autorisé ZP-STATIONS-TO-SERVEURS
DMZ → STATIONS Ping depuis 192.168.50.1 ❌ Bloqué Aucun zone-pair
DMZ → WAN HTTP depuis DMZ vers WAN ❌ Bloqué Aucun zone-pair
WAN → Serveur DMZ (HTTP) HTTP vers 192.168.50.1 ✅ Autorisé ZP-WAN-TO-DMZ
WAN → STATIONS Ping vers 192.168.2.x ❌ Bloqué Aucun zone-pair
WAN → Serveur Syslog (DMZ) Syslog vers 192.168.50.2 ❌ Bloqué Filtrage IP – .50.2 non ciblé

📄 12 Configuration complète (récapitulatif)

Configuration consolidée à appliquer sur le Routeur ZPF — prête à copier-coller dans Packet Tracer.

IOS — Configuration complète ZPF
enable
configure terminal

! ── Zones ───────────────────────────────────────────────────
zone security WAN
zone security DMZ
zone security STATIONS
zone security SERVEURS

! ── Class-maps ──────────────────────────────────────────────
class-map type inspect match-any CM-STATIONS-TO-SERVEURS
 match protocol tcp
 match protocol udp
 match protocol icmp

class-map type inspect match-any CM-TO-DMZ
 match protocol http
 match protocol dns
 match protocol smtp
 match protocol icmp
 match protocol syslog

class-map type inspect match-any CM-TO-WAN
 match protocol http
 match protocol https
 match protocol dns
 match protocol icmp

class-map type inspect match-any CM-WAN-TO-DMZ
 match protocol http
 match protocol dns
 match protocol smtp
 match protocol syslog

! ── Policy-maps ─────────────────────────────────────────────
policy-map type inspect PM-STATIONS-TO-SERVEURS
 class type inspect CM-STATIONS-TO-SERVEURS
  inspect
 class class-default
  drop

policy-map type inspect PM-STATIONS-TO-DMZ
 class type inspect CM-TO-DMZ
  inspect
 class class-default
  drop

policy-map type inspect PM-SERVEURS-TO-DMZ
 class type inspect CM-TO-DMZ
  inspect
 class class-default
  drop

policy-map type inspect PM-STATIONS-TO-WAN
 class type inspect CM-TO-WAN
  inspect
 class class-default
  drop

policy-map type inspect PM-SERVEURS-TO-WAN
 class type inspect CM-TO-WAN
  inspect
 class class-default
  drop

policy-map type inspect PM-WAN-TO-DMZ
 class type inspect CM-WAN-TO-DMZ
  inspect
 class class-default
  drop

! ── Zone-pairs ──────────────────────────────────────────────
zone-pair security ZP-STATIONS-TO-SERVEURS source STATIONS destination SERVEURS
 service-policy type inspect PM-STATIONS-TO-SERVEURS
zone-pair security ZP-STATIONS-TO-DMZ source STATIONS destination DMZ
 service-policy type inspect PM-STATIONS-TO-DMZ
zone-pair security ZP-STATIONS-TO-WAN source STATIONS destination WAN
 service-policy type inspect PM-STATIONS-TO-WAN
zone-pair security ZP-SERVEURS-TO-DMZ source SERVEURS destination DMZ
 service-policy type inspect PM-SERVEURS-TO-DMZ
zone-pair security ZP-SERVEURS-TO-WAN source SERVEURS destination WAN
 service-policy type inspect PM-SERVEURS-TO-WAN
zone-pair security ZP-WAN-TO-DMZ source WAN destination DMZ
 service-policy type inspect PM-WAN-TO-DMZ

! ── Interfaces ──────────────────────────────────────────────
interface FastEthernet0/0
 zone-member security WAN
interface FastEthernet0/1
 zone-member security STATIONS
interface FastEthernet0/2
 zone-member security SERVEURS
interface FastEthernet0/3
 zone-member security DMZ

end
write memory

🏁 13 Conclusion

Cette configuration met en œuvre un pare-feu ZPF complet sur 4 zones, conforme aux bonnes pratiques Cisco. La segmentation par zones offre plusieurs avantages :

Flux autorisés — synthèse :

• STATIONS → SERVEURS : TCP, UDP, ICMP

• STATIONS & SERVEURS → DMZ : HTTP, DNS, SMTP, ICMP, SYSLOG

• STATIONS & SERVEURS → WAN : HTTP, HTTPS, DNS, ICMP

• WAN → DMZ (192.168.50.1 uniquement) : HTTP, DNS, SMTP, SYSLOG

• DMZ → toutes autres zones : BLOQUÉ