{"id":177223,"date":"2013-04-19T01:23:18","date_gmt":"2013-04-18T21:23:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=177223"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=177223","title":{"rendered":"<span class=\"post_title\">Racoon vs. OpenSWAN: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 IPSEC VPN \u0442\u0443\u043d\u043d\u0435\u043b\u044f HOST-TO-SITE \u0441 Cisco \u0438 L2TP over IPSEC \u0434\u043b\u044f Windows, iOS \u0438 Android<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0414\u043e\u0431\u0440\u044b\u0445 \u0434\u0435\u043b, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0425\u0430\u0431\u0440\u0430\u0432\u0447\u0430\u043d\u0435!<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0443\u0432\u043b\u0435\u0447\u044c \u0432\u0430\u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u043e\u043c \u043e \u043c\u043e\u0438\u0445 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u0445 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439 IPSec, \u0433\u0434\u0435 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0439 \u0438 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0439, \u0437\u0430\u0433\u0430\u0434\u043e\u043a \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0438\u0441\u0442\u043e\u0440\u0438\u0439 \u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u0432\u0435\u0440\u043e\u043b\u043e\u043c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432. \u0418\u0442\u0430\u043a, \u043c\u043e\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u044c\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  <i>\u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0440\u043e\u0447\u043d\u0430\u044f \u043f\u043e\u043c\u043e\u0449\u044c, \u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b \u043e \u043c\u043e\u0438\u0445 \u043d\u0435\u0441\u0447\u0430\u0441\u0442\u044c\u044f\u0445, \u043f\u0440\u0438\u0432\u0435\u0434\u0448\u0438\u0445 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u0430\u0442\u044c \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 <a href=\"#Subj\">\u00ab\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u0431\u0436\u00bb<\/a> <\/i><\/p>\n<p>  \u0413\u0434\u0435-\u0442\u043e \u0441 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e IPSec. \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Debian Squeeze \u0438 KAME ipsec-tools, \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043d\u0430\u0440\u043e\u0434\u044c\u0435 racoon. \u041e\u0445, \u0438 \u043d\u0435 \u0437\u043d\u0430\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u044f \u0434\u0443\u0448\u0430 \u043f\u0440\u0438\u043a\u0438\u043f\u0435\u043b\u0430 \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0432 \u0442\u0435\u043e\u0440\u0438\u044e IPSec, \u044f \u0432\u0437\u044f\u043b\u0441\u044f \u0437\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443:<\/p>\n<pre><code class=\"bash\">apt-get install racoon <\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0420\u0430\u043a\u0443\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u043b\u0441\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f, \u0443\u0442\u044f\u043d\u0443\u0432 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0434\u043e\u0441\u0442\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u043b \u043c\u0435\u043d\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0442\u0443\u0442.<\/p>\n<p>  \u041d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0436\u0434\u0430\u043b\u0430 \u0435\u0433\u043e \u0432\u043e\u0437\u043b\u044e\u0431\u043b\u0435\u043d\u043d\u0430\u044f CISCO, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u0440\u0430\u0432\u0434\u0430, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430 \u0435\u0449\u0435 \u043f\u0430\u0440\u0443 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439, \u043d\u043e \u0441 \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c \u0436\u0434\u0430\u043b\u0430, \u0447\u0442\u043e \u043d\u0430\u0448 \u0433\u0435\u0440\u043e\u0439 \u043a \u043d\u0435\u0439 \u043f\u043e\u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f, \u043d\u0430\u0437\u043e\u0432\u0435\u0442 PreShared Key \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442 \u0435\u0435 \u0432 \u043e\u0431\u044a\u044f\u0442\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e IPSec \u043a\u0430\u043d\u0430\u043b\u0430.<\/p>\n<p>  \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0435 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435, \u0432\u0435\u0434\u044c \u0441\u0442\u0440\u043e\u0433\u0438\u0439, \u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b\u0439 \u043e\u0442\u0435\u0446 CISCO \u2014 \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u043d\u0430 \u0442\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u043d\u0435 \u0434\u0430\u0432\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0435\u0439 \u043f\u043e\u0434\u043e\u043f\u0435\u0447\u043d\u043e\u0439 \u0431\u0435\u0437 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438:<\/p>\n<pre><code class=\"bash\">IKE 3DES  \tHASH SHA-1  \tDiffie Hellman Grupo 2  \tLife Time 86400 seconds  \tAuthentication by Preshared Key   IPSec\t 3DES  \tIntegrity : ESP\/SHA1  \tMode: Tunel  \tPerfect Forward Secrecy (Active)  \tLifetime 3600 seconds   x.x.x.x - IP \u0430\u0434\u0440\u0435\u0441 \u043c\u043e\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u043d \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 y.y.y.y - IP Cisco z.z.z.z - IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0437\u0430 Cisco <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u043b\u044e\u0431\u043b\u0435\u043d\u043d\u044b\u043c, \u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u0443\u0448\u043b\u043e \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430. \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043b\u044e\u0431\u043e\u0432\u044c \u0432\u043e\u0441\u0442\u043e\u0440\u0436\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 site-to-site, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0447\u044c \u043c\u043e\u0437\u0433 \u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u0445\u043e\u0441\u0442 \u2014 \u044d\u0442\u043e \u0442\u0430 \u0436\u0435 \u0441\u0435\u0442\u044c, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043c\u0430\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 255.255.255.255, \u0442\u043e \u0435\u0441\u0442\u044c \/32. <\/p>\n<p>  \u041d\u043e \u0441\u0447\u0430\u0441\u0442\u044c\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u0434\u043e\u043b\u0433\u0438\u043c. \u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0445\u043e\u0441\u0442\u044b \u043f\u043e L2TP over IPSec, \u0438 \u0437\u0434\u0435\u0441\u044c \u0420\u0430\u043a\u0443\u043d \u043d\u0435 \u0441\u043c\u043e\u0433 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0435 ipsec-tools, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043c\u043e\u0433 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c wildcard (*) \u0434\u043b\u044f preshared key, \u0442\u0430\u043a \u043a\u0430\u043a IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u043c\u0430\u0448\u0438\u043d \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b. \u0412\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0441\u0438\u0435 \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">diff -ur a\/ipsec-tools-0.7.1\/src\/racoon\/localconf.c b\/ipsec-tools-0.7.1\/src\/racoon\/localconf.c --- a\/ipsec-tools-0.7.1\/src\/racoon\/localconf.c\t2006-09-09 11:22:09.000000000 -0500 +++ b\/ipsec-tools-0.7.1\/src\/racoon\/localconf.c\t2010-08-06 16:35:18.000000000 -0500  &lt;at&gt;  &lt;at&gt;  -211,7 +211,8  &lt;at&gt;  &lt;at&gt;   \t\tif (*p == '\\0')  \t\t\tcontinue;\t\/* no 2nd parameter *\/  \t\tp--; -\t\tif (strncmp(buf, str, len) == 0 && buf[len] == '\\0') { +\t\tif (strncmp(buf, &quot;*&quot;, 2) == 0 || +\t\t    (strncmp(buf, str, len) == 0 && buf[len] == '\\0')) {  \t\t\tp++;  \t\t\tkeylen = 0; <\/code><\/pre>\n<p>  \u0411\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0435\u0449\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u043a\u0440\u043e\u043f\u043e\u0442\u043b\u0438\u0432\u043e\u0433\u043e \u043a\u0443\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u043d\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0433 \u043f\u0440\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 .\/configure. \u0412 \u0438\u0442\u043e\u0433\u0435, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e BenV, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0449\u0430\u043b\u0430: <a href=\"http:\/\/notes.benv.junerules.com\/ipsec-tools-and-slackware64\/\">And you trust your security to these clowns (\u0418 \u0432\u044b \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u0438\u043c \u043a\u043b\u043e\u0443\u043d\u0430\u043c)<\/a>. \u041d\u0435 \u043f\u0440\u0438\u0434\u0430\u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u0441\u043b\u043e\u0432\u0430\u043c, \u0432\u0435\u0434\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0438\u043b\u0430, \u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b \u0420\u0430\u043a\u0443\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Road Warrior.<\/p>\n<p>  <a name=\"l2tp\"><\/a>  <\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 L2TP<\/h4>\n<p>  C L2TP \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e:<\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b xl2tp \u0438 ppp  <\/p>\n<pre><code class=\"bash\">apt-get install xl2tp ppp <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 How-to:  <\/p>\n<pre><code class=\"bash\"># \/etc\/xl2tpd\/xl2tpd.conf [global] ipsec saref = yes force userspace = yes [lns default] local ip = 10.1.2.1 ip range = 10.1.2.10-10.1.2.254 # \u043f\u0443\u043b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 refuse pap = yes require authentication = yes ppp debug = yes length bit = yes pppoptfile = \/etc\/ppp\/options    # \/etc\/ppp\/options:  ms-dns  10.1.2.1 ms-dns  8.8.8.8 require-mschap-v2 asyncmap 0 auth crtscts lock hide-password modem debug name l2tpd proxyarp lcp-echo-interval 10 lcp-echo-failure 100    #\/etc\/ppp\/chap-secrets:  # Secrets for authentication using CHAP # client        server  secret                  IP addresses username        *       userpass                *  # \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 IP addresses \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u043d\u0443. \u0423 \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f alvelig \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 10.1.2.7 alvelig               *        alvelig                 10.1.2.7 <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u0441 ipsec-tools \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0440\u0430\u043a\u0443\u043d\u0430:<\/p>\n<pre><code class=\"bash\"># \/etc\/racoon\/racoon.conf: path include &quot;\/etc\/racoon&quot;; path pre_shared_key &quot;\/etc\/racoon\/psk.txt&quot;; # \u043f\u0443\u0442\u044c \u0434\u043e PreShared Keys \u0444\u0430\u0439\u043b\u0430 (\u0441\u043c. \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435) path certificate &quot;\/etc\/racoon\/certs&quot;;  # \u043a\u043e\u043d\u0444\u0438\u0433 IKE \u0434\u043b\u044f Road Warrior remote anonymous {         exchange_mode aggressive,main;         passive on;         proposal_check obey;         support_proxy on;         nat_traversal on;         ike_frag on;         dpd_delay 20;         proposal         {                 encryption_algorithm aes;                 hash_algorithm sha1;                 authentication_method pre_shared_key;                 dh_group modp1024;         }         proposal         {                 encryption_algorithm 3des;                 hash_algorithm sha1;                 authentication_method pre_shared_key;                 dh_group modp1024;         } }  # IPSEC \u0434\u043b\u044f Road Warrior \u0438 CISCO sainfo anonymous {         pfs_group 2;         lifetime time 3600 sec;         encryption_algorithm 3des;         authentication_algorithm hmac_sha1;         compression_algorithm deflate ; }  # IKE \u0434\u043b\u044f CISCO remote y.y.y.y {         exchange_mode main, aggressive;         my_identifier address;         lifetime time 86400 sec;         nat_traversal on;         dpd_delay     20;         proposal {                 encryption_algorithm 3des;                 hash_algorithm sha1;                 authentication_method pre_shared_key;                 dh_group 2;         } }  <\/code><\/pre>\n<pre><code class=\"bash\"># \/etc\/racoon\/psk.txt:  # PSK \u0434\u043b\u044f Cisco 200.68.5.131            CiscoPSK  # PSK \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0437\u0430 NAT *                       RoadWarrior  <\/code><\/pre>\n<pre><code class=\"bash\"># \/etc\/ipsec-tools.conf #!\/usr\/sbin\/setkey -f # # Flush SAD and SPD flush; spdflush; # Create policies for racoon  spdadd x.x.x.x\/32 z.z.z.z\/32 any -P out ipsec esp\/tunnel\/x.x.x.x-y.y.y.y\/require; spdadd z.z.z.z\/32 x.x.x.x\/32 any -P in ipsec esp\/tunnel\/y.y.y.y-x.x.x.x\/require;  ########################## ##      XL2TP           ## ##########################  spdadd 0.0.0.0\/0[0] 0.0.0.0\/0[1701] udp -P in ipsec esp\/transport\/\/require; spdadd 0.0.0.0\/0[1701] 0.0.0.0\/0[0] udp -P out ipsec esp\/transport\/\/require;   <\/code><\/pre>\n<p>  \u041d\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0434\u0435\u043b\u044e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u0434\u0440\u0443\u0433 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c, \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u043e, \u2014 \u044d\u0442\u043e restart racoon \u0438\u043b\u0438 reboot.<\/p>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043f\u0438\u043b\u043e\u0442\u043d\u044b\u043c, \u0442\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0435\u043b, \u0438, \u0432 \u043e\u0431\u0449\u0435\u043c, \u043d\u0430 \u043a\u043e\u0441\u0442\u044b\u043b\u044f\u0445 \u0438 \u0437\u0430\u043f\u043b\u0430\u0442\u043a\u0430\u0445 \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u043b \u043f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443 \u043c\u0435\u043d\u044f \u0434\u043e\u0448\u043b\u0438 \u0440\u0443\u043a\u0438 \u0434\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0441\u043a\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0432 \u0432\u043e\u043f\u0440\u043e\u0441\u0435, \u0438 \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u043d\u0430 bug-fixes \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043d\u0435\u0443\u043b\u043e\u0432\u0438\u043c\u044b\u0435 \u0432\u0435\u0449\u0438 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e ipsec-tools 0.8.1. \u0418 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430 racoon \u0441\u043e\u043e\u0431\u0449\u0438\u043b \u043c\u043d\u0435 \u043e \u0442\u044f\u0436\u0435\u043b\u043e\u0439 \u0431\u043e\u043b\u0435\u0437\u043d\u0438 \u2014 segmentation fault.<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0433\u043e \u0443\u0434\u0430\u0440\u0430 \u044f \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433. \u041d\u0435 \u0441\u043f\u0430\u043b \u043d\u043e\u0447\u044c: \u0434\u0443\u043c\u0430\u043b, \u043a\u0430\u043a \u0436\u0435 \u0442\u0430\u043a\u2026<\/p>\n<p>  \u041f\u0440\u043e\u0441\u043d\u0443\u0432\u0448\u0438\u0441\u044c \u0443\u0442\u0440\u043e\u043c, \u0432\u044b\u043f\u0438\u043b \u0447\u0430\u044e, \u0437\u0430\u043a\u0443\u0441\u0438\u043b \u0431\u0443\u0442\u0435\u0440\u0431\u0440\u043e\u0434\u043e\u043c \u0438 \u0441\u0435\u043b \u0437\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440. \u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0437\u0430\u0433\u043e\u0440\u0435\u043b\u0430\u0441\u044c \u043c\u044b\u0441\u043b\u044c: OpenSWAN! \u0410\u0439 \u0434\u0430, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c! <\/p>\n<p>  <a name=\"Subj\"><\/a>  <\/p>\n<h4>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u0431\u0436<\/h4>\n<pre><code class=\"bash\">apt-get install openswan <\/code><\/pre>\n<p>  Aptitude \u0440\u0443\u0433\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e OpenSWAN \u043d\u0435 \u0434\u0440\u0443\u0436\u0438\u0442 \u0441 racoon, \u0438 \u0441 \u0431\u044b\u043b\u044b\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u043f\u0440\u043e\u0449\u0430\u0442\u044c\u0441\u044f. \u041d\u0443, \u0431\u044b\u043b\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 OpenSWAN.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u043c\u0443\u0447\u0435\u043d\u0438\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 racoon \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenSWAN \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043b\u0435\u0433\u0447\u0435 \u043b\u0435\u0433\u043a\u043e\u0433\u043e (\u0438\u043b\u0438, \u043c\u043e\u0436\u0435\u0442, \u044f \u043e\u043f\u044b\u0442\u0430 \u0443\u0436\u0435 \u043d\u0430\u0431\u0440\u0430\u043b\u0441\u044f):<\/p>\n<pre><code class=\"bash\"># \/etc\/ipsec.conf  config setup # \u041e\u0431\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439         nat_traversal=yes # \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0437\u0430 NAT          conn cisco # \u0422\u0443\u043d\u043d\u0435\u043b\u044c \u043a \u0446\u0438\u0441\u043a\u0435         dpddelay=30 # Dead peer detection - 30 \u0441\u0435\u043a\u0443\u043d\u0434 - \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043c\u0435\u0436\u0434\u0443 keep-alive \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438         dpdtimeout=120 # dpd \u0442\u0430\u0439\u043c\u0430\u0443\u0442 120 \u0441\u0435\u043a\u0443\u043d\u0434, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0445\u043e\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c         dpdaction=restart # \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0445\u043e\u0441\u0442\u0443          # IKE alg 3DES - HASH sha1 - DH group 2 (1024)          ike=3des-sha1-modp1024          # IKE lifetime 86400 seconds (24 hours)         ikelifetime=86400s          # IKE auth method Pre-Shared Key (PSK secret)         authby=secret          # IPSEC params         # \u0417\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0436\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 OpenSWAN         # phase2=esp # by default         # phase2=3des-sha1 # by default the same as IKE         # IPSec type tunnel         type=tunnel # \u0440\u0435\u0436\u0438\u043c - \u0442\u0443\u043d\u043d\u0435\u043b\u044c         # IPSEC (key) lifetime         salifetime=3600s         # Perfect Forward Secrecy PFS group the same as IKE (1024)         pfs=yes # \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c Perfect Forward Secrecy          #left side (myside)         left=x.x.x.x # OpenSWAN side         # \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0445\u043e\u0441\u0442 \u0431\u044b\u043b \u043e\u0434\u0438\u043d, \u0438 \u043e\u043d \u0436\u0435 \u0431\u044b\u043b \u0438 \u0448\u043b\u044e\u0437\u043e\u043c IPSec, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 netmask x.x.x.x\/32         leftsubnet=x.x.x.x\/32 #net subnet on left side to assign to right side         leftnexthop=y.y.y.y # CISCO side          #right security gateway (CISCO side)         right=y.y.y.y #CISCO side         rightsubnet=z.z.z.z\/32 #net on right side         rightnexthop=x.x.x.x # OpenSWAN side         auto=start  # Road Warrior conn L2TP         authby=secret         pfs=no         auto=add         keyingtries=3         rekey=no         ikelifetime=8h         keylife=1h         type=transport         left=x.x.x.x         leftprotoport=17\/%any # \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u043e\u044f\u043b\u043e 1701, \u043d\u043e iOS \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f. \u041f\u043e\u043c\u0435\u043d\u044f\u043b \u043d\u0430 %any \u0438, \u043e \u0447\u0443\u0434\u043e: \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0439 iPad \u0442\u043e\u0436\u0435 \u0431\u044b\u043b \u0432 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432!         right=%any         rightprotoport=17\/%any         compress=no         dpddelay=30         dpdtimeout=120         dpdaction=clear  # dpdaction=clear \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435, \u0442.\u043a. ipsec \u0437\u0434\u0435\u0441\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f  #\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u0446\u0438\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 &quot;\u043c\u0435\u0440\u0442\u0432\u044b\u0439 peer&quot;,  #\u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043d\u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043d\u043e\u0432\u0430  <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 L2TP \u0434\u0430\u0436\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c: \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0441\u0440\u0430\u0437\u0443. <a href=\"#l2tp\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 L2TP<\/a>.  <\/p>\n<pre><code class=\"bash\">ipsec setup start  ping z.z.z.z  64 bytes from z.z.z.z: icmp_req=1 ttl=254 time=7.53 ms 64 bytes from z.z.z.z: icmp_req=2 ttl=254 time=6.59 ms 64 bytes from z.z.z.z: icmp_req=3 ttl=254 time=6.41 ms 64 bytes from z.z.z.z: icmp_req=4 ttl=254 time=6.77 ms <\/code><\/pre>\n<p>  \u0418 \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0441\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 \u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430 \u043d\u0435\u0434\u0435\u043b\u044c \u043c\u0443\u0447\u0435\u043d\u0438\u0439 \u0441 racoon.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043f\u0440\u0438\u0437\u043d\u0430\u044f \u0426\u0438\u0441\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0441\u0441\u043e\u0440\u0438\u043b\u0430\u0441\u044c \u0438 \u0440\u0432\u0430\u043b\u0430 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441 \u0420\u0430\u043a\u0443\u043d\u043e\u043c, \u0430 \u0432\u043e\u0442 \u0441 OpenSWAN (\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0430 \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435? \u043c\u043e\u0436\u0435\u0442, \u0436\u0435\u043d\u0441\u043a\u043e\u0433\u043e, \u0442\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442) \u0443\u0436\u0435 \u0442\u0440\u0435\u0442\u044c\u044e \u043d\u0435\u0434\u0435\u043b\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0438 \u0431\u0435\u0437 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0438 \u0441\u043a\u0430\u043d\u0434\u0430\u043b\u043e\u0432.<\/p>\n<h4>\u041f\u043e\u0441\u0442\u0441\u043a\u0440\u0438\u043f\u0442\u0443\u043c<\/h4>\n<p>  \u0415\u0441\u043b\u0438 VPN-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0445\u043e\u0441\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u0440\u0443\u0433 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0430, \u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442:  <\/p>\n<pre><code class=\"bash\">echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward <\/code><\/pre>\n<p>\u0418\u043b\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u0430\u0448 iptables<\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/post\/155929\/\">\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 iOS \u0438 Windows<\/a><\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043f\u043e\u0447\u0435\u043c\u0443 racoon \u0432\u044b\u043f\u0430\u0434\u0430\u043b \u0432 segfault \u0438 \u0442\u0435\u0440\u044f\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>  \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u041d\u041b\u041e \u0437\u0430 \u0438\u043d\u0432\u0430\u0439\u0442. \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/177223\/\"> http:\/\/habrahabr.ru\/post\/177223\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0414\u043e\u0431\u0440\u044b\u0445 \u0434\u0435\u043b, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0425\u0430\u0431\u0440\u0430\u0432\u0447\u0430\u043d\u0435!<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0443\u0432\u043b\u0435\u0447\u044c \u0432\u0430\u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u043e\u043c \u043e \u043c\u043e\u0438\u0445 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u0445 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439 IPSec, \u0433\u0434\u0435 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0439 \u0438 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0439, \u0437\u0430\u0433\u0430\u0434\u043e\u043a \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0438\u0441\u0442\u043e\u0440\u0438\u0439 \u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u0432\u0435\u0440\u043e\u043b\u043e\u043c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432. \u0418\u0442\u0430\u043a, \u043c\u043e\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u044c\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  <i>\u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0440\u043e\u0447\u043d\u0430\u044f \u043f\u043e\u043c\u043e\u0449\u044c, \u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b \u043e \u043c\u043e\u0438\u0445 \u043d\u0435\u0441\u0447\u0430\u0441\u0442\u044c\u044f\u0445, \u043f\u0440\u0438\u0432\u0435\u0434\u0448\u0438\u0445 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u0430\u0442\u044c \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 <a href=\"#Subj\">\u00ab\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u0431\u0436\u00bb<\/a> <\/i><\/p>\n<p>  \u0413\u0434\u0435-\u0442\u043e \u0441 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e IPSec. \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Debian Squeeze \u0438 KAME ipsec-tools, \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043d\u0430\u0440\u043e\u0434\u044c\u0435 racoon. \u041e\u0445, \u0438 \u043d\u0435 \u0437\u043d\u0430\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u044f \u0434\u0443\u0448\u0430 \u043f\u0440\u0438\u043a\u0438\u043f\u0435\u043b\u0430 \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0432 \u0442\u0435\u043e\u0440\u0438\u044e IPSec, \u044f \u0432\u0437\u044f\u043b\u0441\u044f \u0437\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443:<\/p>\n<pre><code class=\"bash\">apt-get install racoon <\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-177223","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/177223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177223"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/177223\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}