{"id":3004,"date":"2012-10-18T13:17:44","date_gmt":"2012-10-18T10:17:44","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=3004"},"modified":"2022-03-14T16:13:59","modified_gmt":"2022-03-14T14:13:59","slug":"openvpn-%d0%b0%d0%b2%d1%82%d0%be%d1%80%d0%b8%d0%b7%d0%b0%d1%86%d0%b8%d1%8f-%d0%bf%d0%be-%d0%bf%d0%b0%d1%80%d0%be%d0%bb%d1%8e-%d0%b1%d0%b5%d0%b7-%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%b9-%d1%87%d0%b5%d1%80","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=3004","title":{"rendered":"Openvpn: \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0430\u0440\u043e\u043b\u044e \u0431\u0435\u0437 \u043a\u043b\u044e\u0447\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 pam"},"content":{"rendered":"<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <strong>openvpn&#8217;a<\/strong>, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <strong>Centos Linux<\/strong>. \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 <strong>pam<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0432\u044b\u0434\u0430\u0442\u044c \u0435\u043c\u0443 3 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (<strong>ca.crt, ta.key, dh1024.pem<\/strong>). \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 <strong>vpn<\/strong> \u0442\u0443\u043d\u043d\u0435\u043b\u044c.<\/p>\n<p><em><strong><span style=\"color: #008000;\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434:<\/span><\/strong><\/em>\u00a0<strong>\u041e\u0421 Centos 6.3, openvpn 2.2.1<\/strong><\/p>\n<p><!--more--><\/p>\n<p><strong><span style=\"color: #ff0000;\">1) \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430.<\/span><\/strong><\/p>\n<p>\u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 <strong>Centos&#8217;a openvpn&#8217;a<\/strong> \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<p><code>#rpm -Uvh http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-7.noarch.rpm<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u0432\u0438\u043c<strong> openvpn<\/strong><\/p>\n<p><code>#yum install openvpn.x86_64<\/code><\/p>\n<p><strong><span style=\"color: #ff0000;\">2) \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/span><\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0443<strong> \/etc\/openvpn<\/strong> (\u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442). \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u044d\u0442\u0443 \u043f\u0430\u043f\u043a\u0443 \u0444\u0430\u0439\u043b\u044b \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b:<\/p>\n<p><code>#cp -R \/usr\/share\/openvpn\/easy-rsa \/etc\/openvpn\/<\/code><\/p>\n<p>\u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0443 <strong>1.0<\/strong> \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 <strong>\/etc\/openvpn\/easy-rsa<\/strong><\/p>\n<p><code>#rm -rf \/etc\/openvpn\/easy-rsa\/1.0<\/code><\/p>\n<p>\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443<\/p>\n<p><code>#cd \/etc\/openvpn\/easy-rsa\/2.0<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b <strong>vars<\/strong> &#8211; \u043c\u0435\u043d\u044f\u0435\u043c \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0430 \u0441\u0432\u043e\u0451, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0447\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u0442\u044c, \u0430 \u0447\u0442\u043e \u043d\u0435\u0442 &#8211; \u043c\u043e\u0436\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c.<br \/>\n\u0423\u0437\u043d\u0430\u0451\u043c \u0432\u0435\u0440\u0441\u0438\u044e <strong>openssl<\/strong><\/p>\n<p><code>#openssl version<br \/>\nOpenSSL 1.0.0-fips 29 Mar 2010<\/code><\/p>\n<p>\u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043c\u043b\u0438\u043d\u043a \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f <strong>1.0.0<\/strong>, \u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 \u0442\u0430\u043a \u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439<strong> 0.9.8<\/strong> \u0438 <strong>0.9.6<\/strong>):<\/p>\n<p><code>#ln -s openssl-1.0.0.cnf openssl.cnf<\/code><\/p>\n<p>\u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0435<\/p>\n<p><code>#source .\/vars<br \/>\n#.\/clean-all<br \/>\n#.\/build-ca<\/code><\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0436\u0430\u0442\u044c <strong>Enter<\/strong> \u0438\u043b\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0447\u0435\u0441\u0442\u043d\u043e \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430<strong> .\/build-ca<\/strong> \u0432\u044b\u0434\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 <strong>.\/clean-all<\/strong>, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 <strong>source .\/vars<\/strong>, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u043f\u044f\u0442\u044c <strong>.\/build-ca<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c (\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e \u0432\u0441\u0435\u043c \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u043c\u0441\u044f \u0438 \u0432\u0435\u0437\u0434\u0435 \u0441\u0442\u0430\u0432\u0438\u043c <strong>y<\/strong>):<\/p>\n<p><code>#.\/build-key-server server<br \/>\n#.\/build-dh<br \/>\n#openvpn --genkey --secret keys\/ta.key<\/code><\/p>\n<p>\u0412\u0441\u0451 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0430. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <strong>\/etc\/openvpn\/server.conf<\/strong> \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p><code>port 2294<br \/>\nproto udp<br \/>\ndev tun<br \/>\nca \/etc\/openvpn\/easy-rsa\/2.0\/keys\/ca.crt<br \/>\ncert \/etc\/openvpn\/easy-rsa\/2.0\/keys\/server.crt<br \/>\nkey \/etc\/openvpn\/easy-rsa\/2.0\/keys\/server.key<br \/>\ndh \/etc\/openvpn\/easy-rsa\/2.0\/keys\/dh1024.pem<br \/>\ntls-auth \/etc\/openvpn\/easy-rsa\/2.0\/keys\/ta.key 0<br \/>\nclient-to-client<br \/>\nserver 10.11.0.0 255.255.255.0<br \/>\npush \"route 10.11.0.0 255.255.255.0\"<br \/>\npush \"dhcp-option DNS 8.8.8.8\"<br \/>\npush \"dhcp-option DNS 8.8.4.4\"<br \/>\npush \"redirect-gateway\"<br \/>\ntls-server<br \/>\ncompress lzo<br \/>\ncipher AES-256-CBC<br \/>\nuser nobody<br \/>\ngroup nobody<br \/>\npersist-key<br \/>\npersist-tun<br \/>\nstatus \/var\/log\/openvpn\/status.log<br \/>\nlog-append \/var\/log\/openvpn\/openvpn.log<br \/>\nverb 3<br \/>\nkeepalive 10 120<br \/>\nmanagement 127.0.0.1 5555 \/etc\/openvpn\/management.pwd<br \/>\nplugin \/usr\/lib64\/openvpn\/plugin\/lib\/openvpn-auth-pam.so login<br \/>\nusername-as-common-name<br \/>\ntmp-dir \/etc\/openvpn\/tmp<br \/>\nscript-security 2<br \/>\nclient-cert-not-required<\/code><\/p>\n<p><em><strong><span style=\"color: #ff0000;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u0414\u043b\u044f <strong>Windows<\/strong> \u0432\u0435\u0440\u0441\u0438\u0438 <strong>openvpn<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u043f\u043e\u043a\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 pam-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0432\u0438\u0434\u0435<strong> dll<\/strong>-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\u00a0<strong>OpenVPNSSPI.dll<\/strong>. \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/code.google.com\/p\/openvpnauthwindowsplugin\/source\/browse\/trunk\/Release\/OpenVPNSSPI.dll?r=2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0443\u0442\u0435\u0439. \u0414\u043b\u044f <strong>VPN&#8217;a<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0442\u044c <strong>10.11.0.0\/24<\/strong>, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0442 \u044e\u0437\u0435\u0440\u0430 openvpn, \u043b\u043e\u0433\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 <strong>\/var\/log\/openvpn<\/strong> (\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0430\u043f\u043a\u0443). \u0422\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <strong>5555<\/strong> \u043f\u043e\u0440\u0442\u0443 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0434\u043e &#8211; \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#8211; \u0441\u043e\u0437\u0434\u0430\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b \u0438 \u043f\u043e\u043b\u043e\u0436\u0438 \u0442\u0443\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435). \u0422\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <strong>\/etc\/openvpn\/tmp<\/strong> \u0438 \u0434\u0430\u0442\u044c \u0435\u0439 \u043f\u0440\u0430\u0432\u0430 <strong>0777<\/strong> \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e (\u0438\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 <strong>permission denied<\/strong>)<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c openvpn:<\/p>\n<p><code>#service openvpn start<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0443\u0434\u0430\u0447\u043d\u043e, \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <strong>tun0<\/strong>.<\/p>\n<p><strong><span style=\"color: #ff0000;\">3) \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/span><\/strong><\/p>\n<p>\u0414\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0430\u043c\u043e\u0433\u043e <strong>openvpn&#8217;a<\/strong> \u0438 \u043a\u043b\u044e\u0447\u0435\u0439 c<strong>a.crt, ta.key, dh1024.pem<\/strong>. \u0418\u0445 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 <strong>c:\\vpn<\/strong>. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b <strong>client.ovpn<\/strong> \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>c:\\program file\\openvpn\\config<\/strong> (\u0438\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 <strong>openvpn<\/strong> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0443 \u0434\u0440\u0443\u0433\u0443\u044e) \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f (\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 <strong>Windows XP<\/strong> \u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 2 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c):<\/p>\n<p><code>client<br \/>\ndev tun<br \/>\ntls-client<br \/>\nproto udp<br \/>\nremote XX.XX.XX.XX 2294<br \/>\nresolv-retry infinite<br \/>\nnobind<br \/>\nremote-cert-tls\u00a0server<br \/>\nverb 3<br \/>\ncipher DES-EDE3-CBC<br \/>\ncompress lzo<br \/>\nca C:\\\\vpn\\\\ca.crt<br \/>\ndh C:\\\\vpn\\\\dh1024.pem<br \/>\ntls-auth C:\\\\vpn\\\\ta.key 1<br \/>\npersist-key<br \/>\npersist-tun<br \/>\nauth-user-pass<br \/>\nroute-method exe<br \/>\nroute-delay 2<\/code><\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u0441\u043b\u0435\u0448\u0438 \u0432 \u043f\u0443\u0442\u0438 &#8211; \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<br \/>\n\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 <strong>openvpn gui <em><span style=\"color: #ff6600;\">\u0422\u041e\u041b\u042c\u041a\u041e \u041e\u0422 \u0418\u041c\u0415\u041d\u0418 \u0410\u0414\u041c\u0418\u041d\u0418\u0421\u0422\u0420\u0410\u0422\u041e\u0420\u0410<\/span><\/em><\/strong> \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a, \u0438\u043d\u0430\u0447\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p><strong><span style=\"color: #ff0000;\">4) \u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/span><\/strong><\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u043e\u0433\u043b\u0438 \u0445\u043e\u0434\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438, \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0444\u043e\u0440\u0432\u0430\u0440\u0434\u0438\u043d\u0433 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<p><code>#sysctl net.ipv4.ip_forward=1<\/code><\/p>\n<p>\u0430 \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0444\u0430\u0439\u043b <strong>\/etc\/sysctl.conf<\/strong> \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n<p><code>net.ipv4.ip_forward=1<\/code><\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0431\u0443\u0442\u0430 \u043d\u0435 \u0441\u043b\u0435\u0442\u0430\u043b\u043e.<br \/>\n\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441 <strong>openvpn<\/strong> \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<p><code>#chkconfig openvpn on<\/code><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e <strong>NAT<\/strong>. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>#\/sbin\/iptables --table nat --append POSTROUTING --out-interface eth0 -j SNAT --to-source XX.XX.XX.XX<\/code><\/p>\n<p>\u0430 \u0447\u0442\u043e \u0431\u044b \u043f\u0440\u0438 \u0440\u0435\u0431\u0443\u0442\u0435 \u043d\u0435 \u0441\u043b\u0435\u0442\u0430\u043b\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b <strong>\/etc\/rc.d\/rc.local<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 openvpn&#8217;a, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Centos Linux. \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 pam, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0432\u044b\u0434\u0430\u0442\u044c \u0435\u043c\u0443 3 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (ca.crt, ta.key, dh1024.pem). \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 vpn \u0442\u0443\u043d\u043d\u0435\u043b\u044c. \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434:\u00a0\u041e\u0421 Centos 6.3, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-3004","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3004","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=3004"}],"version-history":[{"count":11,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3004\/revisions"}],"predecessor-version":[{"id":5853,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/3004\/revisions\/5853"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}