我在 Raspberry pi (tftp-hpa) 上安装了一个 TFTP 服务器。配置文件如下:
TFTPD_ARGS="--secure /srv/archlinux/"
当我从锉刀本身连接时,一切工作正常:
$>tftp localhost
tftp> trace
Packet tracing on.
tftp> get syslinux/lpxelinux.0
sent RRQ <file=syslinux/lpxelinux.0, mode=netascii>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
received DATA <block=2, 512 bytes>
sent ACK <block=2>
received DATA <block=3, 512 bytes>
sent ACK <block=3>
received DATA <block=4, 512 bytes>
sent ACK <block=4>
received DATA <block=5, 512 bytes>
sent ACK <block=5>
received DATA <block=6, 512 bytes>
sent ACK <block=6>
...
但是当我从我的电脑上尝试时,好像 TFTP 服务器从未收到 ACK 消息并继续发送第一个块:
$>tftp nexus
tftp> trace
Packet tracing on.
tftp> get syslinux/lpxelinux.0
sent RRQ <file=syslinux/lpxelinux.0, mode=netascii>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
sent ACK <block=1>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
sent ACK <block=1>
sent ACK <block=1>
sent ACK <block=1>
received DATA <block=1, 512 bytes>
sent ACK <block=1>
Transfer timed out.
tftp>
有关信息,这是我的 iptables,如您所见,没有过滤流量的规则:
$>sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
你能帮助我解决这个问题吗?
答案1
朋友!我宁愿迟回答也不愿不回答))您的问题很可能是您一直在与端口 69 上的服务器通信。但标准规定,服务器在收到 WRQ 或 RRQ 请求后,会在不同的端口(不是 69)上创建一个新的套接字并从新端口响应,并等待对新端口的确认。