
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://livre.g6.asso.fr/index.php?action=history&amp;feed=atom&amp;title=Mise_en_place_d%27une_paire_de_SA_IPsec</id>
		<title>Mise en place d'une paire de SA IPsec - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://livre.g6.asso.fr/index.php?action=history&amp;feed=atom&amp;title=Mise_en_place_d%27une_paire_de_SA_IPsec"/>
		<link rel="alternate" type="text/html" href="http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;action=history"/>
		<updated>2026-05-25T01:36:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.2</generator>

	<entry>
		<id>http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2859&amp;oldid=prev</id>
		<title>Bruno Deniaud at 09:19, 14 February 2006</title>
		<link rel="alternate" type="text/html" href="http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2859&amp;oldid=prev"/>
				<updated>2006-02-14T09:19:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:19, 14 February 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{suivi| Architectures classiques de mise en oeuvre des IPsec | Architectures classiques de mise en oeuvre des IPsec | Critique des IPsec | Critique des IPsec }}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Deux machines A et B utilisent le système d'exploitation FreeBSD et on souhaite configurer une paire de SA IPsec entre ces deux machines. Afin d'utiliser IPsec, il est nécessaire que l'option IPSEC soit compilée dans le noyau41. Dans un premier temps une paire de SA IPsec sera mise en place en utilisant le protocole ESP. Pour cela, il faut configurer d'une part la base de données de politique de sécurité IPsec (SPD) et d'autre part la base de données des associations de sécurité (SAD).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Deux machines A et B utilisent le système d'exploitation FreeBSD et on souhaite configurer une paire de SA IPsec entre ces deux machines. Afin d'utiliser IPsec, il est nécessaire que l'option IPSEC soit compilée dans le noyau41. Dans un premier temps une paire de SA IPsec sera mise en place en utilisant le protocole ESP. Pour cela, il faut configurer d'une part la base de données de politique de sécurité IPsec (SPD) et d'autre part la base de données des associations de sécurité (SAD).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L213&quot; &gt;Line 213:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 214:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pour tester que la configuration fonctionne correctement, on peut utiliser la commande &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pour tester que la configuration fonctionne correctement, on peut utiliser la commande &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{suivi| Architectures classiques de mise en oeuvre des IPsec | Architectures classiques de mise en oeuvre des IPsec | Critique des IPsec | Critique des IPsec }}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bruno Deniaud</name></author>	</entry>

	<entry>
		<id>http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2056&amp;oldid=prev</id>
		<title>Laurent Toutain: /* Configuration dynamique de la SAD */</title>
		<link rel="alternate" type="text/html" href="http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2056&amp;oldid=prev"/>
				<updated>2005-12-03T14:22:17Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configuration dynamique de la SAD&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:22, 3 December 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L205&quot; &gt;Line 205:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 205:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; '''''Fichier psk.txt sur B :'''''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; '''''Fichier psk.txt sur B :'''''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; 2001:660:3203:1020:210:b5ff:feab:4cc4 123456789abcde&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; 2001:660:3203:1020:210:b5ff:feab:4cc4 123456789abcde&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Une fois les fichiers correctement configurés, nous pouvons lancer le démon IKE à l'aide de la commande &amp;lt;tt&amp;gt;racoon&amp;lt;/tt&amp;gt; sur les machines A et B (cf. &amp;lt;tt&amp;gt;man racoon&amp;lt;/tt&amp;gt; pour plus d'informations sur cette commande) :&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Une fois les fichiers correctement configurés, nous pouvons lancer le démon IKE à l'aide de la commande &amp;lt;tt&amp;gt;racoon&amp;lt;/tt&amp;gt; sur les machines A et B (cf. &amp;lt;tt&amp;gt;man racoon&amp;lt;/tt&amp;gt; pour plus d'informations sur cette commande) :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #racoon -f /usr/local/etc/racoon/racoon.conf&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;racoon -f /usr/local/etc/racoon/racoon.conf&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pour tester que la configuration fonctionne correctement, on peut utiliser la commande &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Pour tester que la configuration fonctionne correctement, on peut utiliser la commande &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Laurent Toutain</name></author>	</entry>

	<entry>
		<id>http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2055&amp;oldid=prev</id>
		<title>Laurent Toutain: /* Configuration manuelle de la SAD */</title>
		<link rel="alternate" type="text/html" href="http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2055&amp;oldid=prev"/>
				<updated>2005-12-03T14:21:48Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configuration manuelle de la SAD&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:21, 3 December 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L115&quot; &gt;Line 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 115:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #set SAD between A and B&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #set SAD between A and B&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; add $A $B esp 0x20001 -E rijndael-cbc &amp;quot;GISELEGISELEGISELEGISELE&amp;quot; -A hmac-sha1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &lt;/del&gt;&amp;quot;KAMEKAMEKAMEKAMEKAME&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; add $A $B esp 0x20001 -E rijndael-cbc &amp;quot;GISELEGISELEGISELEGISELE&amp;quot; -A hmac-sha1 &amp;quot;KAMEKAMEKAMEKAMEKAME&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; add $B $A esp 0x20002 -E rijndael-cbc &amp;quot;GISELEGISELEGISELEGISELE&amp;quot; -A hmac-sha1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&amp;quot;MEKAMEKAMEKAMEKAMEKA&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; add $B $A esp 0x20002 -E rijndael-cbc &amp;quot;GISELEGISELEGISELEGISELE&amp;quot; -A hmac-sha1 &amp;quot;MEKAMEKAMEKAMEKAMEKA&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; EOF&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; EOF&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Laurent Toutain</name></author>	</entry>

	<entry>
		<id>http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2054&amp;oldid=prev</id>
		<title>Laurent Toutain: /* Configuration dynamique de la SAD */</title>
		<link rel="alternate" type="text/html" href="http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2054&amp;oldid=prev"/>
				<updated>2005-12-03T14:21:09Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configuration dynamique de la SAD&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:21, 3 December 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L195&quot; &gt;Line 195:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 195:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;my_identifier&amp;lt;/tt&amp;gt; précise le type de l'identifiant des machines &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;. Ici, les machines sont identifiées par leurs adresses IPv6, donc le fichier contient :&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;my_identifier&amp;lt;/tt&amp;gt; précise le type de l'identifiant des machines &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;. Ici, les machines sont identifiées par leurs adresses IPv6, donc le fichier contient :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;lt;tt&amp;gt;my_identifier address&amp;lt;/tt&amp;gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;lt;tt&amp;gt;my_identifier address&amp;lt;/tt&amp;gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;* &amp;lt;tt&amp;gt;authentication_method&amp;lt;/tt&amp;gt; précise la méthode d'authentification de la phase I. Il s'agit ici du mode &amp;lt;tt&amp;gt;pre_shared_key&amp;lt;/tt&amp;gt; dans la partie &amp;lt;tt&amp;gt;remote anonymous&amp;lt;/tt&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;authentication_method&amp;lt;/tt&amp;gt; précise la méthode d'authentification de la phase I. Il s'agit ici du mode &amp;lt;tt&amp;gt;pre_shared_key&amp;lt;/tt&amp;gt; dans la partie &amp;lt;tt&amp;gt;remote anonymous&amp;lt;/tt&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;path pre_shared_key&amp;lt;/tt&amp;gt; indique le fichier (&amp;lt;tt&amp;gt;/usr/local/etc/racoon/psk.txt&amp;lt;/tt&amp;gt;) contenant la clé&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;tt&amp;gt;path pre_shared_key&amp;lt;/tt&amp;gt; indique le fichier (&amp;lt;tt&amp;gt;/usr/local/etc/racoon/psk.txt&amp;lt;/tt&amp;gt;) contenant la clé&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Laurent Toutain</name></author>	</entry>

	<entry>
		<id>http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2053&amp;oldid=prev</id>
		<title>Laurent Toutain at 14:19, 3 December 2005</title>
		<link rel="alternate" type="text/html" href="http://livre.g6.asso.fr/index.php?title=Mise_en_place_d%27une_paire_de_SA_IPsec&amp;diff=2053&amp;oldid=prev"/>
				<updated>2005-12-03T14:19:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Deux machines A et B utilisent le système d'exploitation FreeBSD et on souhaite configurer une paire de SA IPsec entre ces deux machines. Afin d'utiliser IPsec, il est nécessaire que l'option IPSEC soit compilée dans le noyau41. Dans un premier temps une paire de SA IPsec sera mise en place en utilisant le protocole ESP. Pour cela, il faut configurer d'une part la base de données de politique de sécurité IPsec (SPD) et d'autre part la base de données des associations de sécurité (SAD).&lt;br /&gt;
&lt;br /&gt;
==Configuration de la SPD sur A et B==&lt;br /&gt;
&lt;br /&gt;
Imaginons que la politique de sécurité consiste à protéger tous les échanges entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; par le protocole ESP en mode transport.&lt;br /&gt;
&lt;br /&gt;
Sur A, la SPD peut alors être configurée à l'aide du script présent à le Script de configuration de la SPD sur A. La commande &amp;lt;tt&amp;gt;setkey&amp;lt;/tt&amp;gt; permet de manipuler les bases de données SPD et SAD (cf. &amp;lt;tt&amp;gt;man setkey&amp;lt;/tt&amp;gt;). En particulier, l'option « &amp;lt;tt&amp;gt;-FP&amp;lt;/tt&amp;gt; » permet de nettoyer la SPD et l'option « &amp;lt;tt&amp;gt;-F&amp;lt;/tt&amp;gt; » de nettoyer la SAD.&lt;br /&gt;
&lt;br /&gt;
L'une des opérations de &amp;lt;tt&amp;gt;setkey&amp;lt;/tt&amp;gt; est &amp;lt;tt&amp;gt;spdadd&amp;lt;/tt&amp;gt;. Cette opération permet d'ajouter une politique de sécurité dans la SPD. Elle prend les paramètres suivants :&lt;br /&gt;
&lt;br /&gt;
* « &amp;lt;tt&amp;gt;any&amp;lt;/tt&amp;gt; » signifie que n'importe quel trafic doit être protégé par ESP&lt;br /&gt;
* « &amp;lt;tt&amp;gt;-P out&amp;lt;/tt&amp;gt; » indique que le trafic sortant est pris en considération&lt;br /&gt;
* « &amp;lt;tt&amp;gt;-P in&amp;lt;/tt&amp;gt; » indique que le trafic entrant est pris en considéréation&lt;br /&gt;
* &amp;quot;&amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt;&amp;quot; indique que si la politique ne peut pas être appliquée (pas de SA correspondante), alors on ne doit ni envoyer ni accepter des paquets IP de &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Dans le script, la première règle indique que tout le trafic (&amp;lt;tt&amp;gt;any&amp;lt;/tt&amp;gt;) ayant pour source A et pour destination &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;$A $B&amp;lt;/tt&amp;gt;), qui sort de &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; (&amp;lt;tt&amp;gt;-P out&amp;lt;/tt&amp;gt;), doit être traité par IPsec (&amp;lt;tt&amp;gt;ipsec&amp;lt;/tt&amp;gt;). Ce trafic doit être protégé par ESP en mode transport.&lt;br /&gt;
&lt;br /&gt;
 '''''Script de configuration de la SPD sur A'''''&lt;br /&gt;
 &lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 set A = 2001:0660:3203:1020:210:b5ff:feab:4cc4&lt;br /&gt;
 set B = 2001:0660:3203:1010:210:b5ff:feab:2dc2&lt;br /&gt;
 #nettoie la SPD&lt;br /&gt;
 setkey -FP&lt;br /&gt;
 #nettoie la SAD&lt;br /&gt;
 setkey -F&lt;br /&gt;
 #exécute les opérations indiquées jusqu'à EOF&lt;br /&gt;
 setkey -c &amp;lt;&amp;lt; EOF&lt;br /&gt;
 # policy to use between A and B&lt;br /&gt;
 spdadd $A $B any -P out ipsec esp/transport//require;&lt;br /&gt;
 spdadd $B $A any -P in ipsec esp/transport//require;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 '''''Script de configuration de la SPD sur B'''''&lt;br /&gt;
 &lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 set A = 2001:0660:3203:1020:210:b5ff:feab:4cc4&lt;br /&gt;
 set B = 2001:0660:3203:1010:210:b5ff:feab:2dc2&lt;br /&gt;
  &lt;br /&gt;
 setkey -FP&lt;br /&gt;
 setkey -F&lt;br /&gt;
 setkey -c &amp;lt;&amp;lt; EOF&lt;br /&gt;
  &lt;br /&gt;
 # policy to use between A and B&lt;br /&gt;
  &lt;br /&gt;
 spdadd $A $B any -P in ipsec esp/transport//require;&lt;br /&gt;
 spdadd $B $A any -P out ipsec esp/transport//require;&lt;br /&gt;
  &lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Pour rendre ce script exécutable, il faut utiliser la commande &amp;lt;tt&amp;gt;chmod +x nom_du_script&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Pour définir la SPD sur la machine &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;, un script similaire (voir Script de configuration de la SPD sur B) doit être considéré. Noter que seule la direction de la politique change.&lt;br /&gt;
&lt;br /&gt;
Afin de vérifier que les politiques de sécurité ont été correctement installées sur les deux machines, on peut utiliser la commande &amp;lt;tt&amp;gt;setkey -DP&amp;lt;/tt&amp;gt; qui nous renseigne de plus sur la date de création ainsi que la date de dernière utilisation.&lt;br /&gt;
&lt;br /&gt;
 $(sur B) '''setkey -DP'''&lt;br /&gt;
 2001:660:3203:1020:210:b5ff:feab:4cc4[any] 2001:660:3203:1010:210:b5ff:feab:2dc2[any] any&lt;br /&gt;
 in ipsec&lt;br /&gt;
 esp/transport//require&lt;br /&gt;
 created: Jan 12 14:46:07 2005 lastused: Jan 14 16:05:48 2005&lt;br /&gt;
 lifetime: 0(s) validtime: 0(s)&lt;br /&gt;
 spid=16408 seq=1 pid=21781&lt;br /&gt;
 refcnt=1&lt;br /&gt;
 2001:660:3203:1010:210:b5ff:feab:2dc2[any] 2001:660:3203:1020:210:b5ff:feab:4cc4[any] any&lt;br /&gt;
 out ipsec&lt;br /&gt;
 ah/transport//require&lt;br /&gt;
 created: Jan 12 14:46:07 2005 lastused: Jan 15 03:01:06 2005&lt;br /&gt;
 lifetime: 0(s) validtime: 0(s)&lt;br /&gt;
 spid=16409 seq=0 pid=21781&lt;br /&gt;
 refcnt=1&lt;br /&gt;
&lt;br /&gt;
===Variantes possibles de la SPD===&lt;br /&gt;
&lt;br /&gt;
Nous proposons de donner d'autres exemples de configuration possibles. Pour ne protéger que le trafic ICMPv6 entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; (dans le sens &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;) avec le protocole AH, on utilisera l'opération suivante :&lt;br /&gt;
&lt;br /&gt;
 spdadd $A $B icmp6 -P out ipsec ah/transport//require;&lt;br /&gt;
&lt;br /&gt;
Pour protéger le trafic UDP entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; (de &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;) avec ESP :&lt;br /&gt;
&lt;br /&gt;
 spdadd $A $B udp -P out ipsec esp/transport//require;&lt;br /&gt;
&lt;br /&gt;
Pour protéger tout le trafic entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; (de &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt;) avec AH :&lt;br /&gt;
&lt;br /&gt;
 spdadd $B $A any -P out ipsec ah/transport//require;&lt;br /&gt;
&lt;br /&gt;
On peut aussi vouloir utiliser le mode tunnel. Par exemple, on peut dire à &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; que ses paquets à destination d'une machine &amp;lt;tt&amp;gt;C&amp;lt;/tt&amp;gt; doivent utiliser un tunnel entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; est alors chargé de transmettre les paquets non protégés à &amp;lt;tt&amp;gt;C&amp;lt;/tt&amp;gt;. On utilisera pour cela la commande suivante :&lt;br /&gt;
&lt;br /&gt;
 spdadd $A $C any -P out ipsec esp/tunnel/$A-$B/require;&lt;br /&gt;
&lt;br /&gt;
==Configuration manuelle de la SAD==&lt;br /&gt;
&lt;br /&gt;
Pour que le trafic soit effectivement protégé par IPsec, il faut que les machines A et B partagent une ou des associations de sécurité IPsec. Dans notre exemple, &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; doivent partager deux SAs : une de &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; et une de &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt;. Ces associations de sécurité peuvent être configurées soit manuellement soit dynamiquement en utilisant le protocole IKE. Dans cette partie, nous allons configurer ces deux SAs manuellement à l'aide du script de la See Script de configuration de la SAD sur &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
La commande &amp;lt;tt&amp;gt;add&amp;lt;/tt&amp;gt; permet d'ajouter un SA dans la SAD. La première règle add permet de créer la SA utilisée entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; et de &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; et la seconde crée la SA utilisée entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; mais de &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; vers &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt;. Les paramètres utilisés ici sont :&lt;br /&gt;
&lt;br /&gt;
* le SPI, qui vaut pour la première règle &amp;quot;&amp;lt;tt&amp;gt;0x20001&amp;lt;/tt&amp;gt;&amp;quot;,&lt;br /&gt;
* l'algorithme de chiffrement &amp;quot;&amp;lt;tt&amp;gt;-E rijndael-cbc&amp;lt;/tt&amp;gt;&amp;quot;,&lt;br /&gt;
* la clef utilisée pour le chiffrement &amp;quot;&amp;lt;tt&amp;gt;GISELEGISELEGISELEGISELE&amp;lt;/tt&amp;gt;&amp;quot;,&lt;br /&gt;
* l'algorithme d'authentification &amp;quot;&amp;lt;tt&amp;gt;-A hmac-sha1&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
* la clef correspondante &amp;quot;&amp;lt;tt&amp;gt;KAMEKAMEKAMEKAMEKAME&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez vérifier que cette configuration fonctionne correctement à l'aide des commandes &amp;lt;tt&amp;gt;tcpdump&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; par exemple, &amp;lt;tt&amp;gt;tcpdump&amp;lt;/tt&amp;gt; permettant de voir le trafic arrivant et sortant d'une interface et &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; d'envoyer des paquets ICMPv6 ECHO_REQUEST vers une adresse IPv6.&lt;br /&gt;
&lt;br /&gt;
 '''''Script de configuration de la SAD sur A et B'''''&lt;br /&gt;
 &lt;br /&gt;
 #!/bin/csh&lt;br /&gt;
 set A = 2001:0660:3203:1020:210:b5ff:feab:4cc4&lt;br /&gt;
 set B = 2001:0660:3203:1010:210:b5ff:feab:2dc2&lt;br /&gt;
 setkey -F&lt;br /&gt;
 setkey -c &amp;lt;&amp;lt; EOF&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
 #set SAD between A and B&lt;br /&gt;
  &lt;br /&gt;
 add $A $B esp 0x20001 -E rijndael-cbc &amp;quot;GISELEGISELEGISELEGISELE&amp;quot; -A hmac-sha1   &amp;quot;KAMEKAMEKAMEKAMEKAME&amp;quot;;&lt;br /&gt;
 add $B $A esp 0x20002 -E rijndael-cbc &amp;quot;GISELEGISELEGISELEGISELE&amp;quot; -A hmac-sha1  &amp;quot;MEKAMEKAMEKAMEKAMEKA&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
==Configuration dynamique de la SAD==&lt;br /&gt;
&lt;br /&gt;
L'utilisation du protocole IKE permet la mise en place automatique des associations de sécurité. Il consulte la SPD afin de configurer les SAs correspondantes. Le logiciel &amp;lt;tt&amp;gt;racoon&amp;lt;/tt&amp;gt; est une implémentation de ce protocole. C'est ce logiciel que nous allons utiliser pour automatiser la configuration de la SAD. Si le mode d'authentification choisi repose sur un secret pré-partagé, alors il est nécessaire d'éditer deux fichiers de configuration pour racoon. Ces deux fichiers se trouvent (après installation du logiciel) dans le répertoire &amp;lt;tt&amp;gt;/usr/local/etc/racoon&amp;lt;/tt&amp;gt;. Le fichier &amp;lt;tt&amp;gt;racoon.conf&amp;lt;/tt&amp;gt; est le fichier de configuration de racoon. Un exemple de configuration utilisée sur &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; est donné dans l'encadré suivant. Voici quelques éléments clés du fichier permettant de mieux en comprendre le contenu (le lecteur intéressé pourra obtenir des informations plus précises en tapant &amp;lt;tt&amp;gt;man racoon.conf&amp;lt;/tt&amp;gt;) :&lt;br /&gt;
&lt;br /&gt;
 '''''Fichier racoon.conf''''' &lt;br /&gt;
 &lt;br /&gt;
 # &amp;quot;path&amp;quot; must be placed before it should be used.&lt;br /&gt;
 # You can overwrite which you defined, but it should not use due to confusing.&lt;br /&gt;
 path include &amp;quot;/usr/local/etc/racoon&amp;quot; ;&lt;br /&gt;
  &lt;br /&gt;
 # search this file for pre_shared_key with various ID key.&lt;br /&gt;
 path pre_shared_key &amp;quot;/usr/local/etc/racoon/psk.txt&amp;quot; ;&lt;br /&gt;
  &lt;br /&gt;
 # &amp;quot;padding&amp;quot; defines some parameter of padding. You should not touch these.&lt;br /&gt;
 padding&lt;br /&gt;
 {&lt;br /&gt;
    maximum_length 20; # maximum padding length. &lt;br /&gt;
    randomize off; # enable randomize length.&lt;br /&gt;
    strict_check off; # enable strict check.&lt;br /&gt;
    exclusive_tail off; # extract last one octet.&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 # if no listen directive is specified, racoon will listen to all&lt;br /&gt;
 # available interface addresses.&lt;br /&gt;
 listen&lt;br /&gt;
 {&lt;br /&gt;
    isakmp 2001:0660:3203:1020:210:b5ff:feab:4cc4 [500];&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 # Specification of default various timer.&lt;br /&gt;
 timer&lt;br /&gt;
 {&lt;br /&gt;
    # These value can be changed per remote node.&lt;br /&gt;
    counter 5; # maximum trying count to send.&lt;br /&gt;
    interval 20 sec; # maximum interval to resend.&lt;br /&gt;
    persend 1; # the number of packets per a send.&lt;br /&gt;
  &lt;br /&gt;
    # timer for waiting to complete each phase.&lt;br /&gt;
    phase1 30 sec;&lt;br /&gt;
    phase2 15 sec; &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 remote anonymous&lt;br /&gt;
 {&lt;br /&gt;
    exchange_mode aggressive,main;&lt;br /&gt;
    doi ipsec_doi;&lt;br /&gt;
    situation identity_only;&lt;br /&gt;
  &lt;br /&gt;
    my_identifier address;&lt;br /&gt;
   &lt;br /&gt;
    nonce_size 16;&lt;br /&gt;
    lifetime time 1 min; # sec,min,hour&lt;br /&gt;
    initial_contact on;&lt;br /&gt;
    proposal_check obey; # obey, strict or claim &lt;br /&gt;
  &lt;br /&gt;
    proposal {&lt;br /&gt;
       encryption_algorithm 3des;&lt;br /&gt;
       hash_algorithm sha1;&lt;br /&gt;
       authentication_method pre_shared_key ;&lt;br /&gt;
       dh_group 2 ;&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sainfo anonymous&lt;br /&gt;
 {&lt;br /&gt;
    pfs_group 1;&lt;br /&gt;
    lifetime time 30 sec;&lt;br /&gt;
    encryption_algorithm 3des ;&lt;br /&gt;
    authentication_algorithm hmac_sha1;&lt;br /&gt;
    compression_algorithm deflate ;&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
* &amp;lt;tt&amp;gt;my_identifier&amp;lt;/tt&amp;gt; précise le type de l'identifiant des machines &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;. Ici, les machines sont identifiées par leurs adresses IPv6, donc le fichier contient :&lt;br /&gt;
** &amp;lt;tt&amp;gt;my_identifier address&amp;lt;/tt&amp;gt;;&lt;br /&gt;
** &amp;lt;tt&amp;gt;authentication_method&amp;lt;/tt&amp;gt; précise la méthode d'authentification de la phase I. Il s'agit ici du mode &amp;lt;tt&amp;gt;pre_shared_key&amp;lt;/tt&amp;gt; dans la partie &amp;lt;tt&amp;gt;remote anonymous&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path pre_shared_key&amp;lt;/tt&amp;gt; indique le fichier (&amp;lt;tt&amp;gt;/usr/local/etc/racoon/psk.txt&amp;lt;/tt&amp;gt;) contenant la clé&lt;br /&gt;
&lt;br /&gt;
Le fichier &amp;lt;tt&amp;gt;psk.txt&amp;lt;/tt&amp;gt; contient le secret pré-partagé (cf. Fichier &amp;lt;tt&amp;gt;psk.txt&amp;lt;tt&amp;gt;), c'est-à-dire, il précise l'adresse de la machine distante suivie du secret partagé à savoir ici : 123456789abcde.&lt;br /&gt;
&lt;br /&gt;
 '''''Fichier psk.txt sur A :'''''&lt;br /&gt;
 &lt;br /&gt;
 2001:660:3203:1010:210:b5ff:feab:2dc2 123456789abcde&lt;br /&gt;
&lt;br /&gt;
 '''''Fichier psk.txt sur B :'''''&lt;br /&gt;
 2001:660:3203:1020:210:b5ff:feab:4cc4 123456789abcde&lt;br /&gt;
&lt;br /&gt;
Une fois les fichiers correctement configurés, nous pouvons lancer le démon IKE à l'aide de la commande &amp;lt;tt&amp;gt;racoon&amp;lt;/tt&amp;gt; sur les machines A et B (cf. &amp;lt;tt&amp;gt;man racoon&amp;lt;/tt&amp;gt; pour plus d'informations sur cette commande) :&lt;br /&gt;
&lt;br /&gt;
 #racoon -f /usr/local/etc/racoon/racoon.conf&lt;br /&gt;
&lt;br /&gt;
Pour tester que la configuration fonctionne correctement, on peut utiliser la commande &amp;lt;tt&amp;gt;ping6&amp;lt;/tt&amp;gt; entre &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt; et &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Laurent Toutain</name></author>	</entry>

	</feed>