<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ipsec &#8211; richliu&#039;s blog</title>
	<atom:link href="https://blog.richliu.com/tag/ipsec/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Wed, 23 Dec 2015 05:56:42 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Strongswan ipsec debug</title>
		<link>https://blog.richliu.com/2015/08/19/1839/strongswan-ipsec-debug/</link>
					<comments>https://blog.richliu.com/2015/08/19/1839/strongswan-ipsec-debug/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 19 Aug 2015 09:23:50 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[strongswan]]></category>
		<category><![CDATA[wirehsark]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=1839</guid>

					<description><![CDATA[<p>可以在 runtime 下指令馬上更改 debug command, # ipsec stroke logle [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2015/08/19/1839/strongswan-ipsec-debug/">Strongswan ipsec debug</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>可以在 runtime 下指令馬上更改 debug command,<br />
# ipsec stroke loglevel ike 2<br />
也可以寫在 ipsec.conf 內.<br />
<span id="more-1839"></span></p>
<p><a href="https://wiki.strongswan.org/projects/strongswan/wiki/LoggerConfiguration" target="_blank" rel="noopener">Logger configuration </a></p>
<p>其他可以debug 的參數還有<br />
types are dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, esp, tls, tnc, imc, imv, pts and the level<br />
is one of [-1, 0, 1, 2, 3, 4] (for silent, audit, control, controlmore, raw, private). By default, the level<br />
is set to 1 for all types.</p>
<p><a href="https://wiki.strongswan.org/projects/strongswan/wiki/ConfigSetupSection" target="_blank" rel="noopener">ipsec.conf: config setup</a></p>
<p>如果是要 decode ESP 封包, 要下 command<br />
# ip xfrm state<br />
src &#8212;.&#8212;.&#8212;.&#8212; dst &#8212;.&#8212;.&#8212;.&#8212;<br />
proto esp spi 0xc5833fd7 reqid 4 mode tunnel<br />
replay-window 32 flag af-unspec<br />
auth-trunc hmac(sha1) 0xde33744975f816f9fdcb7969a3d5a337 96<br />
enc cbc(aes) 0x9bf7b545ba3e35523c9a0c9f74b2c386ffb4634d<br />
src &#8212;.&#8212;.&#8212;.&#8212; dst &#8212;.&#8212;.&#8212;.&#8212;<br />
proto esp spi 0xc985f51a reqid 4 mode tunnel<br />
replay-window 32 flag af-unspec<br />
auth-trunc hmac(sha1) 0xf1341b4ddeb700925a8294264b271130 96<br />
enc cbc(aes) 0x2f7a7dc8e136ed645d13b89fcd7b408fce3636ad<br />
取出 SPI , encryption key and authentication key 填到 Wireshark ESP protocol 的 ESP SAs 內就可以了. <a href="http://blog.richliu.com/wp-content/uploads/2015/08/ESP-1.png"><img decoding="async" class="aligncenter size-medium wp-image-1841" src="http://blog.richliu.com/wp-content/uploads/2015/08/ESP-1-300x119.png" alt="ESP-1" width="300" height="119" srcset="https://blog.richliu.com/wp-content/uploads/2015/08/ESP-1-300x119.png 300w, https://blog.richliu.com/wp-content/uploads/2015/08/ESP-1-1024x406.png 1024w, https://blog.richliu.com/wp-content/uploads/2015/08/ESP-1.png 1504w" sizes="(max-width: 300px) 100vw, 300px" /></a><a href="http://blog.richliu.com/wp-content/uploads/2015/08/ESP-2.png"><img decoding="async" class="aligncenter size-medium wp-image-1840" src="http://blog.richliu.com/wp-content/uploads/2015/08/ESP-2-300x110.png" alt="ESP-2" width="300" height="110" srcset="https://blog.richliu.com/wp-content/uploads/2015/08/ESP-2-300x110.png 300w, https://blog.richliu.com/wp-content/uploads/2015/08/ESP-2-1024x375.png 1024w, https://blog.richliu.com/wp-content/uploads/2015/08/ESP-2.png 1490w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2015/08/19/1839/strongswan-ipsec-debug/">Strongswan ipsec debug</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2015/08/19/1839/strongswan-ipsec-debug/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
