{"id":220,"date":"2011-06-25T17:28:00","date_gmt":"2011-06-25T10:28:00","guid":{"rendered":"https:\/\/mohn.ru\/?p=220"},"modified":"2011-06-25T17:28:00","modified_gmt":"2011-06-25T10:28:00","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-%d0%b8-%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-vsftpd-%d0%bd%d0%b0-debianubuntu-iptables","status":"publish","type":"post","link":"https:\/\/mohn.ru\/?p=220","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 vsftpd \u043d\u0430 Debian&#038;Ubuntu + iptables"},"content":{"rendered":"<p>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<div style=\"text-align: center;\">\n<i>#aptitude install vsftpd<\/i><\/div>\n<div style=\"text-align: left;\">\n<i><br \/><\/i><\/div>\n<p>2. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \/etc\/vsftpd.conf \u0438 \u043f\u0440\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0449\u0438:<a name='more'><\/a>\u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u0443\u0441\u043e\u0432<\/p>\n<div style=\"text-align: center;\">\n<i>anonymous_enable=NO<\/i><\/div>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u044e\u0437\u0435\u0440\u0430\u043c \u043b\u043e\u0433\u0438\u0442\u0441\u044f<\/p>\n<div style=\"text-align: center;\">\n<i>local_enable=YES<\/i><\/div>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (644)<\/p>\n<div style=\"text-align: center;\">\n<i>local_umask=022<\/i><\/div>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0440\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0431\u044b\u043b 20<\/p>\n<div style=\"text-align: center;\">\n<i>connect_from_port_20=YES&nbsp;<\/i><\/div>\n<p>\u0417\u0430\u043f\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0435\u0433\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \/ets\/passwd<\/p>\n<div style=\"text-align: center;\">\n<i>chroot_local_user=YES<\/i><\/div>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c ls -R \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c FTP \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c, \u0438\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0430\u0442\u044c FTP \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u043e\u043c<\/p>\n<div style=\"text-align: center;\">\n<i>ls_recurse_enable=YES&nbsp;<\/i><\/div>\n<p>\u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b<\/p>\n<div style=\"text-align: center;\">\n<i>pasv_min_port=50000<\/i><\/div>\n<div style=\"text-align: center;\">\n<i>pasv_max_port=59000<\/i><\/div>\n<p>\u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0435\u043c vsftpd. \/etc\/init.d\/vsftpd restart<\/p>\n<div>\n<br \/>3.  \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a FTP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043e\u0442\u043a\u0440\u043e\u043c\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b \u0432 iptables, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0432 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b\u0438\u043a \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \/var\/lib\/iptables\/rules<\/p>\n<div style=\"text-align: center;\">\n<i>-A INPUT -p tcp -m tcp &#8212;dport 20:21 -j ACCEPT<\/i><\/div>\n<div style=\"text-align: center;\">\n<i>-A INPUT -p tcp -m tcp &#8212;dport 32768:65535 -j ACCEPT<\/i><\/div>\n<div style=\"text-align: center;\">\n<i>-A INPUT -p udp -m udp &#8212;dport 32768:65535 -j ACCEPT<\/i><\/div>\n<div>\n<\/div>\n<p>4. \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 iptables<\/p>\n<div style=\"text-align: center;\">\n<i>\/sbin\/iptables-restore -c &lt; \/var\/lib\/iptables\/rules&nbsp;<\/i><\/div>\n<div>\n<\/div>\n<p>5. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f.<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b: #aptitude install vsftpd 2. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \/etc\/vsftpd.conf \u0438 \u043f\u0440\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0449\u0438:\u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u0443\u0441\u043e\u0432 anonymous_enable=NO \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u044e\u0437\u0435\u0440\u0430\u043c \u043b\u043e\u0433\u0438\u0442\u0441\u044f local_enable=YES \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (644) local_umask=022 \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0440\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0431\u044b\u043b 20 connect_from_port_20=YES&nbsp; \u0417\u0430\u043f\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0435\u0433\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \/ets\/passwd chroot_local_user=YES \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c ls [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,76,77,72,5],"tags":[],"class_list":["post-220","post","type-post","status-publish","format-standard","hentry","category-debian","category-firewall","category-ftp","category-iptables","category-linux"],"_links":{"self":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=220"}],"version-history":[{"count":0,"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts\/220\/revisions"}],"wp:attachment":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}