tftp에 put,get이 안되고 있습니다.

gauibauibo의 이미지

gentoo를 사용하고 있습니다.

 emerge xinetd
 emerge atftp

로 xinetd, tftp를 설치했습니다.

xinetd.conf파일은

defaults
 {
         log_type              = SYSLOG daemon info
         log_on_failure  = HOST
         log_on_success  = PID HOST DURATION EXIT
 
         only_from       = localhost
         cps                   = 50 10
         instances       = 50
         per_source     = 10
 
         v6only             = no
 
         groups             = yes
         umask               = 002
 }       
 
includedir /etc/xinetd.d

로 설정하고

/etc/xinetd.d/tftp 파일을 생성해서

service tftp
{
     socket_type        = dgram
     protocol              = udp
     wait                      = yes
     user                      = root
     server                  = /usr/sbin/in.tftpd
     server_args        = -s -c -p  /tftpboot
     disable                = no
}

설정했습니다.

그리고

 mkdir /tftpboot

로 디렉토리를 생성했습니다.

xinetd를 실행해서 netstat으로 port 69번에 tftp가 돌아가는 것을 확인 하고

같은 pc상에서 tftp client실행해서 localhost로 connect했습니다.

status로 상태를 확인해보면

Connected:  localhost port 69
Mode:       octet
Verbose:    off
Trace:      off
Options
 tsize:     disabled
 blksize:   disabled
 timeout:   disabled
 multicast: disabled
mtftp variables
 client-port:   76
 mcast-ip:      0.0.0.0
 listen-delay:  2
 timeout-delay: 2
Last command: connect localhost

이렇게 나옵니다.

그런데 파일을 put,get하면 계속해서 timeout걸립니다.

어디 설정이 잘못된 것인지... 몇일동안 삽질중입니다.

gauibauibo의 이미지

문제가 해결이 안되서 tftp-hpa package를 다시 설치했습니다.

그래도 문제가 해결이 안되서 wireshark로 packet를 확인해 봤더니

client에서는 요청을 하는데 tftp서버에서 응답이 없었습니다.

그래서 tftpd를 standalone로 실했봤더니...

client에서 파일을 받았습니다.

xinetd의 문제인것 같은데 왜 그런지는 이유를 알지 못하겠습니다.

gentoo에서 atftp, tftp-hpa를 설치하면

/etc/conf.d/밑에

atftp -> atftp
tftp-hpa -> in.tftpd

파일이 생성되는데

rc-update add 생성된 파일면

하면 스텐드 얼론으로 실행 됩니다.