{"id":3988,"date":"2013-12-09T12:04:59","date_gmt":"2013-12-09T10:04:59","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=3988"},"modified":"2025-05-12T08:03:05","modified_gmt":"2025-05-12T05:03:05","slug":"%d1%82%d1%83%d0%bd%d0%bd%d0%b5%d0%bb%d1%8c-solaris-linux","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=3988","title":{"rendered":"\u0422\u0443\u043d\u043d\u0435\u043b\u044c (\u0431\u0435\u0437 IPSec) Solaris <---> Linux, FreeBSD <---> Linux"},"content":{"rendered":"<p><strong><span style=\"color: #ff0000;\">\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/span><\/strong><\/p>\n<p><em><span style=\"color: #ff6600;\">Solaris (net 192.168.66.0\/24) 1.1.1.1 &lt;&#8212;(10.65.0.1 &lt;&#8212;&gt;\u00a010.65.0.2)&#8212;&gt; 2.2.2.2 (net 192.168.88.0\/24) Linux<\/span><\/em><\/p>\n<p><em><span style=\"color: #ff6600;\">FreeBSD (net 192.168.77.0\/24) 3.3.3.3 &lt;&#8212;(10.77.0.1 &lt;&#8212;&gt;\u00a010.77.0.2) &#8212;&gt; 2.2.2.2 (net 192.168.88.0\/24) Linux<\/span><\/em><\/p>\n<p><!--more--><\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439 L3.<\/p>\n<p><strong><span style=\"color: #ff0000;\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/span><\/strong><\/p>\n<h1><strong><span style=\"color: #0000ff;\">Solaris 11.1<\/span><\/strong><\/h1>\n<p><code># dladm create-iptun -T ipv4 -a local=1.1.1.1,remote=2.2.2.2 tun0<br \/>\n# ipadm create-ip tun0<br \/>\n# ipadm create-addr -T static -a local=10.65.0.1,remote=10.65.0.2 tun0\/v4<br \/>\n#\u00a0route -p add -net 192.168.88.0\/24 10.65.0.2<\/code><\/p>\n<h1><strong><span style=\"color: #0000ff;\">Linux debian 6 (kernel 3.2)<\/span><\/strong><\/h1>\n<p><code># \/sbin\/modprobe tun<br \/>\n# \/sbin\/ip tunnel add tun0 mode ipip remote 1.1.1.1 local 2.2.2.2<br \/>\n# \/sbin\/ifconfig tun0 10.65.0.2 netmask 255.255.255.252 pointopoint 10.65.0.1<br \/>\n# \/sbin\/ip link set tun0 up<br \/>\n# route add -net 192.168.66.0\/24 gw 10.65.0.1<\/code><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0431\u0443\u0442\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 <strong>\/etc\/rc.local<\/strong>.<\/p>\n<h1><strong><span style=\"color: #0000ff;\">FreeBSD 9.1<\/span><\/strong><\/h1>\n<p><code>#\u00a0ifconfig gif0 create inet 10.77.0.1 10.77.0.2 netmask 255.255.255.252 tunnel 3.3.3.3 2.2.2.2 up<br \/>\n# route add -net\u00a0192.168.88.0\/24 gw 10.77.0.2<\/code><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0431\u0443\u0442\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0430\u043a\u043e\u0435 \u0432 <strong>\/etc\/rc.conf<\/strong>:<\/p>\n<p><code>gif_interfaces=\"gif0\"<br \/>\ncloned_interfaces=\"gif0\"<br \/>\nifconfig_gif0=\"inet 10.77.0.1 10.77.0.2 netmask 255.255.255.252 tunnel 3.3.3.3 2.2.2.2 mtu 1500\"<br \/>\nstatic_routes=\"r1\"<br \/>\nroute_r1=\"192.168.88.0\/24 -iface gif0\"<\/code><\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0435\u043d\u0438\u0435:<\/span><\/strong><\/em><\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 <strong>10.\u0425<\/strong> \u043e\u043f\u0446\u0438\u044f\u00a0<strong>gif_interfaces<\/strong> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0439 \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>cloned_interfaces<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: Solaris (net 192.168.66.0\/24) 1.1.1.1 &lt;&#8212;(10.65.0.1 &lt;&#8212;&gt;\u00a010.65.0.2)&#8212;&gt; 2.2.2.2 (net 192.168.88.0\/24) Linux FreeBSD (net 192.168.77.0\/24) 3.3.3.3 &lt;&#8212;(10.77.0.1 &lt;&#8212;&gt;\u00a010.77.0.2) &#8212;&gt; 2.2.2.2 (net 192.168.88.0\/24) Linux<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,24],"tags":[],"class_list":["post-3988","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-linux","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3988"}],"version-history":[{"count":9,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3988\/revisions"}],"predecessor-version":[{"id":6559,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3988\/revisions\/6559"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}