0

I have a TFTP server installed on a CentOS host.

/etc/xinetd.d/tftp:

service tftp
{
    disable = no
    socket_type             = dgram
    protocol                = udp
    wait                    = yes
    user                    = root
    server                  = /usr/sbin/in.tftpd
    server_args             = -c -s /var/lib/tftpboot
    per_source              = 11
    cps                     = 100 2
    flags                   = IPv4
}

If I try to PUT a file from a remote host to the host running the TFTP server, I get Transfer Timed Out - however, it does create the file in /var/lib/tftpboot but the file is empty. If I tftp from the tftp server to itself (localhost) and PUT a file, it works fine. I have verified that SELinux is disabled and IPTables are turned off. I can connect from the remote hosts with no issue - just seems to be the PUT I have issue with:

[root@SVR01 TEST]# tftp 10.100.2.15
tftp> status
Connected to 10.100.2.15.
Mode: netascii Verbose: off Tracing: off Literal: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> 
4
  • What are the permissions on the destination file?
    – ewwhite
    Aug 19, 2014 at 15:02
  • drwxrwxrwx 2 root root 4096 Aug 19 14:55 tftpboot
    – Jason
    Aug 19, 2014 at 15:04
  • I asked about the destination file. What are the permissions on it?
    – ewwhite
    Aug 19, 2014 at 15:10
  • @ewwhite Sorry, the file that I'm trying to send from the host to the tftp server? -rw-r--r-- 1 root root 8821 Aug 18 17:59 AUDIT_2014-08-18.log
    – Jason
    Aug 19, 2014 at 15:19

3 Answers 3

0

Run "chmod 666" on the empty file then try your tftp again.

1
  • Thanks. Tried that and the result is the same. Transfer Timed Out. -rw-rw-rw- 1 root root 0 Aug 19 15:22 AUDIT_2014-08-18.log
    – Jason
    Aug 19, 2014 at 15:23
0

Use tcpdump 'port 69 and udp', then strace -s 2000 -ttf -p . And try to put file to tftp again, you should have enough output to debug this problem.

Also double check getenforce, iptables -L -v -n.

0

TFTP establishes transfers on port 69 but the actual data transfer uses an ephemeral port. In your case port 69 works, the Server creates and open the file but the data never arrives; surely the ephemeral port is blocked. That's why you see the transferred file with 0 bytes on it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .