{"id":192,"date":"2021-01-21T18:09:22","date_gmt":"2021-01-21T09:09:22","guid":{"rendered":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=192"},"modified":"2024-08-07T16:50:37","modified_gmt":"2024-08-07T07:50:37","slug":"ftp-vsftpd-%ea%b3%84%ec%a0%95-%ec%b6%94%ea%b0%80","status":"publish","type":"page","link":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=192","title":{"rendered":"ftp (vsftpd)  \uacc4\uc815 \ucd94\uac00"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\uacc4\uc815\ucd94\uac00<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Remark:<\/h3>\n\n\n\n<p>CentOS \uc5d0 \uacc4\uc815\uc744 \ucd94\uac00 \ud558\uace0 fileziller \ub85c \ud30c\uc77c\uc744 \uacc4\uc815\ud3f4\ub354\uc5d0 \uc62c\ub824 \ubcf4\uc790.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \ub514\ub809\ud1a0\ub9ac \uc0dd\uc131 (\uacc4\uc815\uc0dd\uc131\uc2dc \ub514\ub809\ud1a0\ub9ac \ub9cc\ub4e4\uc9c0 \uc54a\ub294 \uacbd\uc6b0)<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># mkdir \/var\/www\/helloworld<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. helloworld \uacc4\uc815 \uc0dd\uc131<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># sudo useradd -c helloworld -d \/var\/www\/helloworld -s \/usr\/sbin\/nologin -p passwd hello<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. hello passwd \uc124\uc815<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># sudo passwd hello<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4. helloworld \ud3f4\ub354\uad8c\ud55c \uc124\uc815<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># sudo chown -R hello:apache \/var\/www\/helloworld\/\n# sudo chmod -R 755 \/var\/www\/helloworld\/<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5. vsfpd&nbsp; setting and port change<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" ># cat vim \/etc\/vsftpd\/vsftpd.conf\n\nlisten=YES\nanonymous_enable=NO\nlocal_enable=YES\nwrite_enable=YES\n\ndirmessage_enable=YES\n\nxferlog_enable=YES\n\n#connect_from_port_20=YES\n\nchroot_local_user=YES\n\n#listen_ipv6=YES\n\nrsa_cert_file=\/etc\/ssl\/certs\/vsftpd.pem\n\npam_service_name=vsftpd  \n\nlisten_port=50021\npasv_min_port=60010\npasv_max_port=60018\npasv_address= {\ub0b4 Server IP}\npasv_addr_resolve=YES\npasv_enable=YES\nlog_ftp_protocol=YES\n\nforce_dot_files=YES\nhide_ids=YES\nmax_per_ip=10\nmax_clients=100\nallow_writeable_chroot=YES<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6. port services change &#8211; \ud544\uc694 \uc5c6\uc74c<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># sudo vi \/etc\/services\n\nftp 21\/tcp =&gt; ftp 50021\/tcp<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7. firewall open (OR iptable)<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">Inbound range : * use IP Only Open\nfpt tcp : 50021\npassv tcp : 60010:60018<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">8. restart vsftpd<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \"># systemctl restart vsftpd<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">9. SSL (if need) &#8211; \ub2e4\ub978 SSL  \ud544\uc694\uc2dc<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout \/etc\/vsftpd\/vsftpd.pem -out \/etc\/vsftpd\/vsftpd.pem<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">10. SSL vsftpd add &#8211; \ub2e4\ub978 SSL \ud544\uc694\uc2dc<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">rsa_cert_file=\/etc\/vsftpd\/vsftpd.pem\nrsa_private_key_file=\/etc\/vsftpd\/vsftpd.pem\nssl_enable=YES<\/pre><\/div>\n\n\n\n<p>ERR : &#8220;ECONNREFUSED &#8211; \uc11c\ubc84\uc5d0\uc11c\uc758 \uc5f0\uacb0 \uac70\ubd80&#8221;(\uc73c)\ub85c \uc5f0\uacb0 \uc2dc\ub3c4 \uc2e4\ud328.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uacc4\uc815\ucd94\uac00 Remark: CentOS \uc5d0 \uacc4\uc815\uc744 \ucd94\uac00 \ud558\uace0 fileziller \ub85c \ud30c\uc77c\uc744 \uacc4\uc815\ud3f4\ub354\uc5d0 \uc62c\ub824 \ubcf4\uc790. 1. \ub514\ub809\ud1a0\ub9ac \uc0dd\uc131 (\uacc4\uc815\uc0dd\uc131\uc2dc \ub514\ub809\ud1a0\ub9ac \ub9cc\ub4e4\uc9c0 \uc54a\ub294 \uacbd\uc6b0) 2. helloworld \uacc4\uc815 \uc0dd\uc131 3. hello passwd \uc124\uc815 4. helloworld \ud3f4\ub354\uad8c\ud55c \uc124\uc815 5. vsfpd&nbsp; setting and port change 6. port services change &#8211; \ud544\uc694 \uc5c6\uc74c 7. firewall open (OR iptable) 8. restart vsftpd 9. &hellip;<br \/><a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=192\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">ftp (vsftpd)  \uacc4\uc815 \ucd94\uac00<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":189,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-192","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=192"}],"version-history":[{"count":16,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/192\/revisions"}],"predecessor-version":[{"id":620,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/192\/revisions\/620"}],"up":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/189"}],"wp:attachment":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}