<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=IPSec%3A_Howto</id>
	<title>IPSec: Howto - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=IPSec%3A_Howto"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=IPSec:_Howto&amp;action=history"/>
	<updated>2026-04-20T09:09:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=IPSec:_Howto&amp;diff=40240&amp;oldid=prev</id>
		<title>Onnowpurbo at 20:35, 5 April 2014</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=IPSec:_Howto&amp;diff=40240&amp;oldid=prev"/>
		<updated>2014-04-05T20:35:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:35, 5 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot;&gt;Line 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 105:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sudo /etc/init.d/setkey start&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sudo /etc/init.d/setkey start&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;==Referensi==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;* https://help.ubuntu.com/community/IPSecHowTo&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=IPSec:_Howto&amp;diff=40239&amp;oldid=prev</id>
		<title>Onnowpurbo: New page: Sumber: https://help.ubuntu.com/community/IPSecHowTo   introduction  This covers using manually-keyed connections, and is geared toward very small or primarily star toplogy networks (an NI...</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=IPSec:_Howto&amp;diff=40239&amp;oldid=prev"/>
		<updated>2014-04-05T20:35:32Z</updated>

		<summary type="html">&lt;p&gt;New page: Sumber: https://help.ubuntu.com/community/IPSecHowTo   introduction  This covers using manually-keyed connections, and is geared toward very small or primarily star toplogy networks (an NI...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: https://help.ubuntu.com/community/IPSecHowTo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
introduction&lt;br /&gt;
&lt;br /&gt;
This covers using manually-keyed connections, and is geared toward very small or primarily star toplogy networks (an NIS server and all it&amp;#039;s clients, for example). Larger networks (if all the NIS clients want to talk to each other in an encrypted fashion) would benefit from the use of an automated keying agent, such as racoon. Discussion of such agents is outside the scope of this draft of this document (maybe later).&lt;br /&gt;
&lt;br /&gt;
1. Install the tools&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install ipsec-tools&lt;br /&gt;
&lt;br /&gt;
2. Edit /etc/ipsec-tools.conf file. This file should be of the general form:&lt;br /&gt;
&lt;br /&gt;
 # Configuration for 192.168.1.100&lt;br /&gt;
 &lt;br /&gt;
 # Flush the SAD and SPD&lt;br /&gt;
 flush;&lt;br /&gt;
 spdflush;&lt;br /&gt;
 &lt;br /&gt;
 # Attention: Use this keys only for testing purposes!&lt;br /&gt;
 # Generate your own keys!&lt;br /&gt;
 &lt;br /&gt;
 # AH SAs using 128 bit long keys&lt;br /&gt;
 add 192.168.1.100 192.168.2.100 ah 0x200 -A hmac-md5&lt;br /&gt;
         0xc0291ff014dccdd03874d9e8e4cdf3e6;&lt;br /&gt;
 add 192.168.2.100 192.168.1.100 ah 0x300 -A hmac-md5&lt;br /&gt;
         0x96358c90783bbfa3d7b196ceabe0536b;&lt;br /&gt;
 &lt;br /&gt;
 # ESP SAs using 192 bit long keys (168 + 24 parity)&lt;br /&gt;
 add 192.168.1.100 192.168.2.100 esp 0x201 -E 3des-cbc&lt;br /&gt;
         0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831;&lt;br /&gt;
 add 192.168.2.100 192.168.1.100 esp 0x301 -E 3des-cbc&lt;br /&gt;
         0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df;&lt;br /&gt;
 &lt;br /&gt;
 # Security policies&lt;br /&gt;
 spdadd 192.168.1.100 192.168.2.100 any -P out ipsec&lt;br /&gt;
            esp/transport//require&lt;br /&gt;
            ah/transport//require; &lt;br /&gt;
 &lt;br /&gt;
 spdadd 192.168.2.100 192.168.1.100 any -P in ipsec&lt;br /&gt;
            esp/transport//require&lt;br /&gt;
            ah/transport//require;&lt;br /&gt;
&lt;br /&gt;
It is important to understand this, so let me break it down:&lt;br /&gt;
&lt;br /&gt;
 # AH SAs using 128 bit long keys&lt;br /&gt;
 add 192.168.1.100 192.168.2.100 ah 0x200 -A hmac-md5&lt;br /&gt;
         0xc0291ff014dccdd03874d9e8e4cdf3e6;&lt;br /&gt;
 add 192.168.2.100 192.168.1.100 ah 0x300 -A hmac-md5&lt;br /&gt;
         0x96358c90783bbfa3d7b196ceabe0536b;&lt;br /&gt;
&lt;br /&gt;
This section lists the 128 bit keys for the 192.168.2.100 and 192.168.1.100 connection. Each IP pair has 2 keys - one for each direction (in and out). Each pair of machines needs to know the this information. So, this means that, for each pair of IP&amp;#039;s, you need to generate a new key (hence why this works for small networks, but anything major probably wants a daemon to handle this. Maybe if I feel ambitious, I&amp;#039;ll set mine up to use it and update this with that info).&lt;br /&gt;
&lt;br /&gt;
Also, note the number right after the &amp;#039;ah&amp;#039; for each of these keys. This number needs to be unique for each &amp;#039;add&amp;#039; statement. These keys are generated as follows:&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/random count=16 bs=1| xxd -ps&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t forget to add the 0x in front of it.&lt;br /&gt;
&lt;br /&gt;
Similarly, this section:&lt;br /&gt;
&lt;br /&gt;
 # ESP SAs using 192 bit long keys (168 + 24 parity)&lt;br /&gt;
 add 192.168.1.100 192.168.2.100 esp 0x201 -E 3des-cbc&lt;br /&gt;
         0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831;&lt;br /&gt;
 add 192.168.2.100 192.168.1.100 esp 0x301 -E 3des-cbc&lt;br /&gt;
         0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df;&lt;br /&gt;
&lt;br /&gt;
This works just like the AH keys, except that they are longer. Again, the number after &amp;#039;esp&amp;#039; must be unique. These keys are generated as follows:&lt;br /&gt;
&lt;br /&gt;
 dd if=/dev/random count=24 bs=1| xxd -ps&lt;br /&gt;
&lt;br /&gt;
Again, don&amp;#039;t forget to add the 0x in front of it.&lt;br /&gt;
&lt;br /&gt;
So, these top two sections should list keys for all the IP addresses that the machine cares about. These sections do not change when moving the file amongst machines on either side of a connection. That brings us to the next section:&lt;br /&gt;
&lt;br /&gt;
 # Security policies&lt;br /&gt;
 spdadd 192.168.1.100 192.168.2.100 any -P out ipsec&lt;br /&gt;
            esp/transport//require&lt;br /&gt;
            ah/transport//require;&lt;br /&gt;
 &lt;br /&gt;
 spdadd 192.168.2.100 192.168.1.100 any -P in ipsec&lt;br /&gt;
            esp/transport//require&lt;br /&gt;
            ah/transport//require;&lt;br /&gt;
&lt;br /&gt;
This sets up the policies for in and out communications. So, the above version will work for 192.168.1.100, because all outgoing communication to 192.168.2.100 and all incoming communication from 192.168.2.100 will be encrypted. To use this on the other machine (192.168.2.100), flip the in and out directives, as follows:&lt;br /&gt;
&lt;br /&gt;
 # Security policies&lt;br /&gt;
 spdadd 192.168.1.100 192.168.2.100 any -P in ipsec&lt;br /&gt;
            esp/transport//require&lt;br /&gt;
            ah/transport//require;&lt;br /&gt;
 &lt;br /&gt;
 spdadd 192.168.2.100 192.168.1.100 any -P out ipsec&lt;br /&gt;
            esp/transport//require&lt;br /&gt;
            ah/transport//require;&lt;br /&gt;
&lt;br /&gt;
3. Make the conf file not readable to the world:&lt;br /&gt;
&lt;br /&gt;
 sudo chmod 750 ipsec-tools.conf&lt;br /&gt;
&lt;br /&gt;
Okay, do both sides of the connection have an ipsec-tools.conf? Everyone set? Good, now it gets easy.&lt;br /&gt;
&lt;br /&gt;
4. It will be started at boot by default on systems, so you don&amp;#039;t have to worry about that.&lt;br /&gt;
&lt;br /&gt;
5. Also, starting it wouldn&amp;#039;t hurt either (make sure to do this on both sides of the connection before trying to have them talk to each other; you could also reboot):&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/setkey start&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>