<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span style="box-sizing: border-box; color: #333333;">vsftpd&nbsp;</span>설치</p>
<pre id="code_1612161008720" class="java" data-ke-language="java" data-ke-type="codeblock" style="overflow: auto hidden; padding: 10px; margin-top: 5px; margin-bottom: 5px; max-width: 100%; border: 1px solid rgb(221, 221, 221); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: 21.6px; font-family: &quot;Lucida Console&quot;; background-color: #fafafa; border-radius: 3px;">
   <code class="hljs" style="border: 1px solid rgb(238, 238, 238); background: rgb(40, 44, 52); color: #abb2bf; border-radius: 5px; padding: 0.5em; margin: 3px 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: 1.3em; font-family: verdana; display: block; overflow-x: auto;"># apt install vsftpd</code>
   </pre>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">vsftpd가 설치가 되고 실행된다. 실행이 잘 되고 있는지 상태를 확인해야한다.</p>
<pre id="code_1612161065380" class="java" data-ke-language="java" data-ke-type="codeblock" style="overflow: auto hidden; padding: 10px; margin-top: 5px; margin-bottom: 5px; max-width: 100%; border: 1px solid rgb(221, 221, 221); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: 21.6px; font-family: &quot;Lucida Console&quot;; background-color: #fafafa; border-radius: 3px;">
   <code class="hljs" style="border: 1px solid rgb(238, 238, 238); background: rgb(40, 44, 52); color: #abb2bf; border-radius: 5px; padding: 0.5em; margin: 3px 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: 1.3em; font-family: verdana; display: block; overflow-x: auto;">service vsftpd status</code>
   </pre>
<p style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<figure class="imageblock alignCenter" data-origin-width="1034" data-origin-height="257" data-filename="blob" data-ke-mobilestyle="widthContent" style="margin: 0px auto 20px; max-width: 100%; clear: both; display: table; position: relative; text-align: center; font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span data-url="https://blog.kakaocdn.net/dn/o3eej/btqVIaAv3gX/933v6CY3rbyVuyKUBOeWk0/img.png" data-lightbox="lightbox" data-alt="" style="box-sizing: border-box; cursor: pointer;"><img src="https://blog.kakaocdn.net/dn/o3eej/btqVIaAv3gX/933v6CY3rbyVuyKUBOeWk0/img.png" srcset="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fo3eej%2FbtqVIaAv3gX%2F933v6CY3rbyVuyKUBOeWk0%2Fimg.png" data-origin-width="1034" data-origin-height="257" data-filename="blob" data-ke-mobilestyle="widthContent" style="border: 0px; max-width: 100%; display: inline-block; width: 1034px; margin: 0px; height: auto;" /></span></figure>
<p style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">ftp 포트가 LISTEN 중인지 확인해보자 //&lt;--- sudo 권한필요</p>
<pre id="code_1612161193616" class="java" data-ke-language="java" data-ke-type="codeblock" style="overflow: auto hidden; padding: 10px; margin-top: 5px; margin-bottom: 5px; max-width: 100%; border: 1px solid rgb(221, 221, 221); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: 21.6px; font-family: &quot;Lucida Console&quot;; background-color: #fafafa; border-radius: 3px;">
   <code class="hljs" style="border: 1px solid rgb(238, 238, 238); background: rgb(40, 44, 52); color: #abb2bf; border-radius: 5px; padding: 0.5em; margin: 3px 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: 1.3em; font-family: verdana; display: block; overflow-x: auto;"># netstat -natp | grep ftp</code>
   </pre>
<p style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<figure class="imageblock alignCenter" data-origin-width="759" data-origin-height="24" data-ke-mobilestyle="widthContent" style="margin: 0px auto 20px; max-width: 100%; clear: both; display: table; position: relative; text-align: center; font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span data-url="https://blog.kakaocdn.net/dn/byEwB6/btqVtbZrvfA/vkxeXPpNyq3WA0pF81UFJK/img.png" data-lightbox="lightbox" data-alt="" style="box-sizing: border-box; cursor: pointer;"><img src="https://blog.kakaocdn.net/dn/byEwB6/btqVtbZrvfA/vkxeXPpNyq3WA0pF81UFJK/img.png" srcset="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbyEwB6%2FbtqVtbZrvfA%2FvkxeXPpNyq3WA0pF81UFJK%2Fimg.png" data-origin-width="759" data-origin-height="24" data-ke-mobilestyle="widthContent" style="border: 0px; max-width: 100%; display: inline-block; width: 759px; margin: 0px; height: auto;" /></span></figure>
<p style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">이제 환경설정을 해야한다.</p>
<pre id="code_1612161469077" class="java" data-ke-language="java" data-ke-type="codeblock" style="overflow: auto hidden; padding: 10px; margin-top: 5px; margin-bottom: 5px; max-width: 100%; border: 1px solid rgb(221, 221, 221); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: 21.6px; font-family: &quot;Lucida Console&quot;; background-color: #fafafa; border-radius: 3px;">
   <code class="hljs" style="border: 1px solid rgb(238, 238, 238); background: rgb(40, 44, 52); color: #abb2bf; border-radius: 5px; padding: 0.5em; margin: 3px 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: 1.3em; font-family: verdana; display: block; overflow-x: auto;"># vi /etc/vsftpd.conf</code>
   </pre>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">나의 경우엔 아무것도 안써있었다. 그래서 자신에 상황에 맞게 아래의 링크에서 참고하여 설정했다.</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><b><a href="https://security.appspot.com/vsftpd/vsftpd_conf.html" style="color: #000000; text-decoration-line: none; transition: all 0.3s ease 0s;" target="_blank">https://security.appspot.com/vsftpd/vsftpd_conf.html</a></b></p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">그렇지만 링크를 참고해서 작성하기 힘들다. 그래서 여러 블로그들을 조합해서 했다. 잘 모르니 넘어가자</p>
<pre id="code_1612161615806" class="java" data-ke-language="java" data-ke-type="codeblock" style="overflow: auto hidden; padding: 10px; margin-top: 5px; margin-bottom: 5px; max-width: 100%; border: 1px solid rgb(221, 221, 221); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: 21.6px; font-family: &quot;Lucida Console&quot;; background-color: #fafafa; border-radius: 3px;">
   <code class="hljs" style="border: 1px solid rgb(238, 238, 238); background: rgb(40, 44, 52); color: #abb2bf; border-radius: 5px; padding: 0.5em; margin: 3px 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: 1.3em; font-family: verdana; display: block; overflow-x: auto;">listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
ftpd_banner=Welcome to My FTP Server!
connect_from_port_20=YES
secure_chroot_dir=/<span class="hljs-keyword" style="box-sizing: border-box; color: #f92672;">var</span>/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/<span class="hljs-keyword" style="box-sizing: border-box; color: #f92672;">private</span>/ssl-cert-snakeoil.key
ssl_enable=NO
listen_port=<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">21</span>
pasv_min_port=<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">60020</span>
pasv_max_port=<span class="hljs-number" style="box-sizing: border-box; color: #d19a66;">60030</span></code>
   </pre>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">나의 경우 중요한건&nbsp;<span style="box-sizing: border-box;">pasv_min_port,&nbsp;<span style="box-sizing: border-box;">pasv_max_port 였다.</span></span>&nbsp;이걸 안하면 통신이 안됐기 때문이다.&nbsp;</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span style="box-sizing: border-box;">FTP PASV 통신모드에서 사용할 포트인데 아직도 이 설정 잘 모른다.</span></p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span style="box-sizing: border-box;">왜인지 궁금하다면 FTP 부터 보고 오면 좋을 것 같다.</span></p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span style="box-sizing: border-box;">그래서 방화벽 포트포워딩에서 TCP 21, TCP 60020~60030을 같이 열어줘야 한다.&nbsp;</span></p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;"><span style="box-sizing: border-box;">* 로그인 및 파일전송 로그는<span style="box-sizing: border-box;">&nbsp;</span><span style="box-sizing: border-box;">/var/log/vsftpd.log</span><span style="box-sizing: border-box;">&nbsp;</span>파일에 기록</span></p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">*&nbsp;<span style="box-sizing: border-box;">/etc/ftpusers</span><span style="box-sizing: border-box;">&nbsp;</span>파일에 쓰여진 사용자는 FTP 로그인이 거부</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">아직까지 잘 모르겠지만 서비스 재시작하면 완료다.</p>
<pre id="code_1612161853131" class="html xml" data-ke-language="html" data-ke-type="codeblock" style="overflow: auto hidden; padding: 10px; margin-top: 5px; margin-bottom: 5px; max-width: 100%; border: 1px solid rgb(221, 221, 221); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: 21.6px; font-family: &quot;Lucida Console&quot;; background-color: #fafafa; border-radius: 3px;">
   <code class="hljs xml" style="border: 1px solid rgb(238, 238, 238); background: rgb(40, 44, 52); color: #abb2bf; border-radius: 5px; padding: 0.5em; margin: 3px 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: 1.3em; font-family: verdana; display: block; overflow-x: auto;"># service vsftpd restart
</code>
   </pre>
<p data-ke-size="size16" style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">listen=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">listen_ipv6=NO</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">anonymous_enable=NO</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">local_enable=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">write_enable=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">dirmessage_enable=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">use_localtime=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">xferlog_enable=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">ftpd_banner=Welcome&nbsp;to&nbsp;My&nbsp;FTP&nbsp;Server!</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">connect_from_port_20=YES</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">secure_chroot_dir=/var/run/vsftpd/empty</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">pam_service_name=vsftpd</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">ssl_enable=NO</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">listen_port=21</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">pasv_min_port=60020</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">pasv_max_port=60030</span><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><br style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" /><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">출처:&nbsp;</span><a href="https://saii42.tistory.com/23" style="color: #000000; text-decoration-line: none; transition: all 0.3s ease 0s; font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;" target="_blank">https://saii42.tistory.com/23</a><span style="font-family: &quot;Ubuntu Condensed&quot;, &quot;Noto Sans Korean&quot;; font-size: 14px; background-color: #f1f1f1;">&nbsp;[saii 잡다한 블로그]</span></p>