{"id":157547,"date":"2012-11-06T16:01:03","date_gmt":"2012-11-06T12:01:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=157547"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=157547","title":{"rendered":"<span class=\"post_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u00ab\u043e\u0441\u0442\u0440\u043e\u0432\u043a\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u044b\u00bb \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 VPS \u0437\u0430 30 \u043c\u0438\u043d\u0443\u0442<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/436\/3d3\/f1a\/4363d3f1a43b36ef53e012018a100580.png\" align=\"right\"\/>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0438\u043b\u0443 \u043d\u0430\u0448\u0443\u043c\u0435\u0432\u0448\u0435\u0433\u043e \u0437\u0430\u043a\u043e\u043d\u0430 149-\u0424\u0417 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0445\u0430\u0431\u0440\u0430\u0432\u0447\u0430\u043d \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435? \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433 \u0412\u0435\u043b\u0438\u043a\u043e\u0433\u043e \u041a\u0438\u0442\u0430\u0439\u0441\u043a\u043e\u0433\u043e \u0424\u0430\u0435\u0440\u0432\u043e\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0438 \u0432\u0441\u044f? \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0431\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 VPS \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0434\u0430\u043b\u0435\u043a\u043e \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0432\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e VPN \u0442\u0443\u043d\u043d\u0435\u043b\u044f. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 tor \u0438\u043b\u0438 i2p \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430, \u0432\u0440\u044f\u0434 \u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0439\u0434 \u043d\u0430 \u0437\u0430\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b \u043d\u0435 \u0445\u0430\u043a\u0435\u0440 \u043c\u0438\u0440\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430).<a name=\"habracut\"><\/a><\/p>\n<h4>\u041a\u0430\u043a\u043e\u0439 VPS \u0432\u044b\u0431\u0440\u0430\u0442\u044c?<\/h4>\n<p>  \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \ud83d\ude42 \u041a\u0430\u043a \u044d\u0442\u043e \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0431\u044b\u0432\u0430\u044e\u0442, \u0432\u043e\u0442 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"http:\/\/freevps.us\/thread-1645.html\">\u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 VPS \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u043e\u0432<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044f. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u0432\u0441\u0451 \u043f\u0440\u043e\u0431\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u0440\u043e\u043a\u043e\u043c \u043d\u0430 1 \u043c\u0435\u0441\u044f\u0446, \u043d\u043e \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0441\u044f\u0446 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0431\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0431\u043b\u0430\u0433\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u043e\u0439. \u041d\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u041d\u0438\u0434\u0435\u0440\u043b\u0430\u043d\u0434\u0430\u0445, \u0427\u0435\u0445\u0438\u0438, \u0415\u0433\u0438\u043f\u0442\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0430\u0445. \u041d\u043e \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445 \u043e\u043d \u0431\u044b\u043b \u0441\u0430\u043c\u044b\u0439 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u0437 \u0445\u0430\u043b\u044f\u0432\u043d\u044b\u0445, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u0442\u0435\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0438 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 Nexus 7 \u0447\u0435\u0440\u0435\u0437 Play Store (\u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435).<br \/>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u00ab\u0431\u0435\u043b\u043e\u0433\u043e\u00bb IP \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0432\u0430\u0436\u043d\u043e \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u043c\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u0435, \u043d\u043e \u0435\u0441\u043b\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u044f\u0434\u0440\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 KVM) \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0442\u043e \u0435\u0441\u043b\u0438 \u044f\u0434\u0440\u043e \u043e\u0431\u0449\u0435\u0435 \u0438 \u043d\u0435\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c\u043e\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 OpenVZ) \u043d\u0443\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u0445\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 (\u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435). \u0418 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c debian-\u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e, \u043e\u043d\u0430 \u043f\u0440\u043e\u0449\u0435 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0438\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u043b\u044f \u043d\u0435\u0451. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430 \u0432\u0430\u0448 \u0432\u043a\u0443\u0441.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u0434\u0432\u0443\u0445 \u0430\u0431\u0437\u0430\u0446\u0435\u0432, \u043f\u043e\u0438\u0441\u043a \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e VPS \u0443 \u0432\u0430\u0441 \u0443\u0448\u043b\u043e \u043c\u0438\u043d\u0443\u0442 15, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\/\u043e\u043f\u043b\u0430\u0442\u0438\u043b\u0438 vps \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0443\u0436\u043d\u043e \u0441 \u043d\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043c VPN. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b OpenVPN \u2014 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 VPS \u043d\u0430 \u0431\u0430\u0437\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e OpenVZ \u2014 \u0441\u043a\u043e\u0440\u0435\u0435 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u0422\u041f, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 iptables, NAT \u0438 tun, \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u0430 \u0432\u043e\u0442 tun \u0432\u0440\u044f\u0434 \u043b\u0438. \u041f\u043e\u043a\u0430 \u0442\u0435\u0445\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 (\u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043e\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0430 \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 VPS \u0432 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e), \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u043d\u0435\u043c\u0443, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c OpenVPN:<\/p>\n<p>  <code>apt-get install openvpn<\/code><\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0443\u0442\u0438: \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439<\/p>\n<h5>\u041f\u0443\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447-\u043f\u0430\u0440\u043e\u043b\u044c, \u043d\u043e \u043e\u043d \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447:<\/p>\n<p>  <code>cd \/etc\/openvpn<\/code><br \/>  <code>openvpn --genkey --secret static.key<\/code><\/p>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043a \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 (cat + Ctrl-V) \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \/etc\/openvpn\/tun0.conf:<\/p>\n<pre><code>\/etc\/openvpn\/tun0.conf: dev tun0 ifconfig 192.168.1.1 192.168.1.2 secret \/etc\/openvpn\/static.key<\/code><\/pre>\n<p>  <\/p>\n<h5>\u041f\u0443\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 TLS\/SSL \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u043e \u043e\u043d \u0434\u043e\u043b\u044c\u0448\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u0443\u0445\u043d\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 openvpn:<\/p>\n<p>  <code>cd \/etc\/openvpn<\/code><br \/>  <code>mkdir easy-rsa<\/code><br \/>  <code>cp -R \/usr\/share\/doc\/openvpn\/examples\/easy-rsa\/2.0\/* easy-rsa\/<\/code><br \/>  <code>chmod -R +x easy-rsa\/<\/code><\/p>\n<p>  \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<p>  <code>cd easy-rsa\/<\/code><br \/>  <code>source .\/vars<\/code><br \/>  <code>.\/clean-all<\/code><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c CA \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u043a\u043b\u044e\u0447, \u043d\u0430\u0441 \u043f\u043e\u043f\u0440\u043e\u0441\u044f\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u0434\u0430\u043d\u044b\u0435 \u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0435, \u0432\u0432\u043e\u0434\u0438\u043c \u043b\u044e\u0431\u044b\u0435, \u0445\u043e\u0442\u044c \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u044b\u0435:<\/p>\n<p>  <code>.\/build-ca<\/code><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\/\u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/p>\n<p>  <code>.\/build-key-server server<\/code><\/p>\n<p>  \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f SSL\/TSL \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/p>\n<p>  <code>.\/build-dh<\/code><\/p>\n<p>  \u0418 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f:<\/p>\n<p>  <code>.\/build-key myname<\/code><\/p>\n<p>  \u0412 \u043f\u0430\u043f\u043a\u0435 \/etc\/openvpn\/easy-rsa\/keys \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043b\u044e\u0447\u0438, \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e myname.crt, myname.key (\u0441\u0432\u043e\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c) \u0438 ca.crt (\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 CA)<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0430\u0448\u0438\u043c \u043b\u044e\u0431\u0438\u043c\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \/etc\/openvpn\/tun.conf:<\/p>\n<pre><code>port 1194 proto udp # \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0438\u0441\u043e\u043b\u044c\u0437\u0443\u0435\u043c proto tcp dev tun  ca      \/etc\/openvpn\/easy-rsa\/keys\/ca.crt    # \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 cert    \/etc\/openvpn\/easy-rsa\/keys\/server.crt key     \/etc\/openvpn\/easy-rsa\/keys\/server.key  # \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0441\u0435\u043a\u0440\u0435\u0442\u0435 dh      \/etc\/openvpn\/easy-rsa\/keys\/dh1024.pem  server 192.168.1.0 255.255.255.0  # \u043d\u0430\u0448\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0435\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0443\u044e ifconfig-pool-persist ipp.txt  keepalive 10 120  comp-lzo         # \u0421\u0436\u0430\u0442\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0438 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 persist-key persist-tun  status \/var\/log\/openvpn-status.log # \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0433\u0438 log \/var\/log\/openvpn.log  verb 3  # \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0431\u043e\u043b\u0442\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u043b\u043e\u0433\u043e\u0432  push &quot;dhcp-option DNS 8.8.8.8&quot; # \u0432\u044b\u0434\u0430\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e DNS \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442 \u0433\u0443\u0433\u043b\u0430<\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<p>  <code>service openvpn start<\/code><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438 \u043a\u043b\u044e\u0447\u0438 (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 LZO \u0441\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435!). \u0410 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0432 \u043b\u043e\u0433\u0430\u0445 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435<br \/>  Note: Cannot open TUN\/TAP dev \/dev\/net\/tun: No such file or directory<br \/>  \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0435\u0445\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0430 \u043d\u0430\u043c tun \u043c\u043e\u0434\u0443\u043b\u044c. \u0410 \u0435\u0441\u043b\u0438 \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c VPS, \u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0435\u0449\u0451 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d NAT:<\/p>\n<p>  <code>iptables -t nat -A POSTROUTING -s 192.168.1.0\/24 -o venet0 -j SNAT --to-source SERVER_IP<\/code><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c, \u0442\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0451 \u0432\u043c\u0435\u0441\u0442\u043e 192.168.1.0\/24. \u0412\u043c\u0435\u0441\u0442\u043e venet0 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u043f\u0440\u0438\u0432\u0435\u0442 ifconfig), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e SERVER_IP \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441 VPS. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 iptables:<\/p>\n<p>  <code>iptables-save &gt; \/etc\/iptables.rules<\/code><\/p>\n<p>  \u0412 \/etc\/rc.local:<\/p>\n<p>  <code>iptables-restore &lt; \/etc\/iptables.rules<\/code><\/p>\n<p>  \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 openvpn \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c openvpn \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<p>  <code>update-rc.d openvpn defaults<\/code><br \/>  <code>service openvpn restart<\/code><\/p>\n<p>  \u0412\u0441\u0451! \u042f \u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0447\u0442\u043e \u043c\u044b \u0443\u043f\u0440\u0430\u0432\u0438\u043c\u0441\u044f \u0437\u0430 30 \u043c\u0438\u043d\u0443\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\/157547\/\"> http:\/\/habrahabr.ru\/post\/157547\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/436\/3d3\/f1a\/4363d3f1a43b36ef53e012018a100580.png\" align=\"right\"\/>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0438\u043b\u0443 \u043d\u0430\u0448\u0443\u043c\u0435\u0432\u0448\u0435\u0433\u043e \u0437\u0430\u043a\u043e\u043d\u0430 149-\u0424\u0417 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0445\u0430\u0431\u0440\u0430\u0432\u0447\u0430\u043d \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435? \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433 \u0412\u0435\u043b\u0438\u043a\u043e\u0433\u043e \u041a\u0438\u0442\u0430\u0439\u0441\u043a\u043e\u0433\u043e \u0424\u0430\u0435\u0440\u0432\u043e\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0438 \u0432\u0441\u044f? \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0431\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 VPS \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0434\u0430\u043b\u0435\u043a\u043e \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0432\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e VPN \u0442\u0443\u043d\u043d\u0435\u043b\u044f. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 tor \u0438\u043b\u0438 i2p \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430, \u0432\u0440\u044f\u0434 \u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0439\u0434 \u043d\u0430 \u0437\u0430\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b \u043d\u0435 \u0445\u0430\u043a\u0435\u0440 \u043c\u0438\u0440\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430).<\/p>\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-157547","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/157547","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=157547"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/157547\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}