I have a server which runs cobbler and tftp server.
My task is to configure a read-write tftp server.
tftp is configured through xinetd and the configuration file looks like so:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -B 1380 -v -s -c /var/lib/tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
The problem is that I'm even though it seems like it works, it doesn't accept connections and exiting with "transfer timed out" message.
Some details:
- tftp directory is:
/var/lib/tftpboot - selinux and iptables are disabled
- permissions on folder are as follows:
drwxrw-rw-. 8 root root 4096 2015-12-20 11:17 /var/lib/tftpboot/
- netstat shows that the port is opened:
udp 0 0 0.0.0.0:69 0.0.0.0:* 21455/xinetd
- There are no errors in the
/var/log/messages
log
This is how I test the configuration:
[root@ams2srv1 ~]# touch file.test
[root@ams2srv1 ~]# tftp localhost
tftp> put file.test
Transfer timed out.
tftp> quit
[root@ams2srv1 ~]# tftp localhost -c put file.test
Transfer timed out.
[root@ams2srv1 ~]#
[root@ams2srv1 ~]# touch /var/lib/tftpboot/test.file
[root@ams2srv1 ~]# tftp localhost -c get test.file
Transfer timed out.
Edit #1:
When trying the same commands while connecting to the real IP of the machine there's a new error message which looks like so:
[root@ams2srv1 ~]# tftp 10.x.x.38
tftp> put test
Error code 0: Permission denied
tftp>
But the permissions on the /var/lib/tftpboot
folder are 777 as shown above.
Any ideas about how to solve this issue?
Best Answer
iptables is disabled, but have you flushed any rules that were loaded before you disable the service?
Also, I'd test with the most basic server_args in /etc/xinetd.d/tftp... eg:
Edit: On my machine, tftp 127.0.0.1, and tftp 192.168.0.2 both work correctly, but tftp localhost gives the same results you observe.