Saturday, January 16, 2016

vsftp-ftp

  > site: https://help.ubuntu.com/lts/serverguide/ftp-server.html
sudo apt-get install vsftpd

cd /etc/
sudo cp vsftpd.conf vsftpd.conf-dist
sudo vi vsftpd.conf

#+TITLE: vsftpd.conf
#+begin_src
..
uncomment following line
#write_enable=YES

change following line
listen_ipv6=YES --> NO
..
#+end_src

> check ftp daemon direcory
  cat /etc/passwd |grep ftp
  mkidr /data/srv
  usermod -d /data/ftp ftp
  #  chown root.ftp /data/srv

-- vsftpd
kys@gig:/etc/xinetd.d$ cat /etc/xinetd.d/vsftpd
#+TITLE: vsftpd in xinetd
#+begin_src
service ftp
{
        disable                 = no
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/vsftpd
        per_source              = 5
        instances               = 200
        no_access               = 10.1.1.10
        banner_fail             = /etc/vsftpd.busy
        log_on_success          += PID HOST DURATION
        log_on_failure          += HOST
}
#+end_src
kys@gig:/etc/xinetd.d$
[root@localhost xinetd.d]# service xinetd start
or
[root@localhost xinetd.d]# service xinetd restart


: * telnetd
: 1. instal vsftp or telnetd
:   > ex. centos telnet-server --> yum install telnet-server
:
: 2. Client가 telnet 으로 접속 시도할 경우, 디폴트 포트는 23
:   > /etc/services
:
: 3. etc/xinetd.d/telnet 파일에 밑의 내용 삽입.
:   설정되어있다면 disable이 yes로 되어 있는것을 no로 변환
:   telnet 말고 /etc/xinetd.conf에서도 수정 가능.

sudo vi telnet
#+TITLE: tlenetd
#+begin_src
service telnet
{
   flags  = REUSE
   socket_type = stream
   wait  = no
   user  = root
   server  = /usr/sbin/in.telnetd
   log_on_failure += USERID
   disable  = no
}
#+end_src

- xinetd restart
service xinetd restart

No comments:

Pranten

 Pranten