vsftpd 설정에 관한 질문입니다.

zz181321의 이미지

/etc/vsftpd.conf의 내용을 다음과 같이 하고,

anonymous_enable=YES
local_enable=NO
write_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
anon_world_readable_only=YES
connect_from_port_20=YES
hide_ids=YES
pasv_min_port=50000
pasv_max_port=60000
xferlog_enable=YES
ls_recurse_enable=NO
ascii_download_enable=NO
async_abor_enable=YES
one_process_model=YES
idle_session_timeout=120
data_connection_timeout=300
accept_timeout=60
connect_timeout=60
anon_max_rate=50000

/etc/xinetd.d/의 vsftpd파일을

service ftp
{
        disable                 = no
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/vsftpd
        server_args             = /etc/vsftpd/vsftpd.conf
        per_source              = 5
        instances               = 200
        no_access               = 192.168.1.3
        banner_fail             = /etc/vsftpd.busy_banner
        log_on_success          += PID HOST DURATION
        log_on_failure          += HOST
}

라고 했습니다. (즉 샘플 파일의 인터넷 사이트 모드 설정입니다)

/etc/init.d/vsftpd start 라고 하면

* /etc/vsftpd/vsftpd.conf must contain background=YES and either
* listen=YES or listen_ipv6=YES (but not both)
* in order to start vsftpd from /etc/init.d/vsftpd

라고 뜹니다.

/etc/sbin/vsftpd 를 직접 실행하면
500 OOPS: vsftpd: not configured for standalone, must be started from inetd

라고 뜨고요. 그래서 xinetd를 먼저 실행 시켜봐도 전혀 달라지는게 없더군요 ;

그렇다고 vsftpd.conf에 background=YES와 listen=YES를 넣자니,

메뉴얼 보면 이건 standalone이라더군요.

스탠드얼론 모드면, 이건 xinetd를 사용하는게 아니라서 보안상에 문제가 있는 것이 아닌지요...?

아니면 문제가 없지만, 있다면 어떻게 xinetd와 붙어서 돌아갈 수 있는지 알고 싶습니다.

kirrie의 이미지

standalone모드는 서비스 요청이 있던 없던 항상 해당 데몬이 떠 있는 방식입니다. (x)inetd모드는 (x)inetd 데몬이 서비스 요청이 있을때만 해당 데몬을 띄웁니다.
기억하기로는 standalone모드는 데몬이 항상 떠 있으므로 시스템 자원을 그만큼 더 사용하고, (x)inetd 방식은 요청이 있을때만 데몬을 띄우므로 자원 사용이 그만큼 더 유연합니다.
그러나 요즘 서버들 사양을 생각했을때 둘 다 별 차이 없어보입니다.

그리고 이게 맞는진 모르겠는데 (예전에 본 문서라) (x)inetd방식으로 데몬을 운용할 경우 해당 데몬은 루트 권한으로 돌아갑니다. 즉 해당 데몬이 뚫릴 경우 크래커는 루트 권한을 획득하게 되는거죠. (그래서) standalone모드를 추천합니다. (이게 아니라면 대략 낭패!!)

--->
데비안 & 우분투로 대동단결!

zz181321의 이미지

한 가지 알아 낸게 있습니다.

xinetd start를 했을 때,

netstat -an | grep :21 이라고 해보면,

tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN

라고 나오더군요.

이것은 이미 ftp 서비스가 시작 된게 아닌지요...?

다만 주소가 0 0 0 0이라서 외부에서 접속 못하는것 일까요?

이 현상은 대체 뭔지요 ;;

kirrie의 이미지

0.0.0.0은 anywhere입니다.
21번 포트(ftp)가 열려있다면 한번 접속을 시도해보세요.

참, (x)inetd로 돌리려면 /etc/services 파일(맞나?)에 먼저 포트가 선언되어야 합니다.
해당 파일에 21번 포트가 혹시 주석처리 되어 있지 않은지 확인해보세요.

--->
데비안 & 우분투로 대동단결!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.