我的问题是我试图在服务器上设置tftp,所有东西都运行正常exept当我试图从tftp下载文件它从来没有响应,没有任何错误,我看到,只是沉默,当我嗅到从应该响应的服务器的stream量,我看到请求但服务器从来没有回应的文件
我正在用Fedora 17运行一台电脑(我知道这是生命的尽头,但是这个时候是不可改变的)
我试图让tftp运行在它上面,我安装了tftp( yum install -y tftp-server )并设置为运行,打开了UDP端口69 ,并设置了文件夹的权限,但是没有任何响应,这里是一些输出和configuration文件
当我运行tftp [服务器的ip]得到testing
任何帮助将不胜感激
SELinux :
# setenforce 0 setenforce: SELinux is disabled
tftp config :
cat /etc/xinetd.d/tftp # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /copos/tftp -vvv disable = no per_source = 11 cps = 100 2 flags = IPv4 }
The Directory :
# ls -lah /copos/tftp/ total 48K drwxrwxrwx 4 root root 4.0K Feb 3 14:42 . drwxr-xr-x. 31 coposuser coposuser 4.0K Feb 3 14:46 .. drwxrwxrwx 3 root root 4.0K Feb 3 14:42 clonezilla -rwxrwxrwx 1 root root 27K Feb 3 14:42 pxelinux.0 drwxrwxrwx 2 root root 4.0K Feb 3 14:42 pxelinux.cfg -rwxrwxrwx 1 root root 9 Feb 3 14:42 test
The Port is opened :
# netstat -anp|grep 69|grep xinet udp 0 0 0.0.0.0:69 0.0.0.0:* 3533/xinetd
你可以有防火墙规则阻止访问
要么
您的/ copos目录没有完整的权限。
你应该能够通过做一个:
tail -f /var/log/messages
而您尝试下载文件。 如果你没有得到任何条目,那么它是一个防火墙的问题,如果你得到像这样的东西:
Feb 3 18:50:48 host1 in.tftpd[10298]: RRQ from 192.168.4.190 filename test.xml Feb 3 18:50:48 host1 in.tftpd[10298]: sending NAK (0, Permission denied) to 192.168.4.190
那么它的权限问题。
另外请记住,单独在端口69上进行捕捉并不会显示出所有的痕迹。 tftp服务器将使用不同于69的源端口进行传输。 这就是为什么tftp通常在涉及到NAT的情况下发生故障。
所以完整的交易通常是这样的例如:
client requests file via tftp (source port random_client -> dest port 69) server send back tftp file (source port random_server -> dest port random_client)
正如你所看到的,在69端口上的tcpdump捕获不会显示完整的对话框。 另外,如果你有NAT,一旦服务器试图从69以外的源端口发送一个文件,大多数NAT实现将无法转发数据包(只有一个完整的锥形或受限制的锥形NAT可以工作,但是Port Restricted或者Symmetric NAT将会不)。