Hi folks,
for learning purposes of PXE boot environment I started to configure TFTP server:
sudo dnf install tftp-server tftp
sudo chmod 777 /var/lib/tftpboot
sudo systemctl start tftp
sudo systemctl enable tftp
sudo firewall-cmd --zone=public --add-service=tftp --permanent
sudo firewall-cmd --reload
sudo touch /var/lib/tftpboot/file1.txt
echo "Hello File 1" | sudo tee /var/lib/tftpboot/file1.txt
Now, on the same machine I can retrieve the file:
tftp myserver.mydomain.local -m binary -c get file1.txt /dev/stdout Hello File 1
On another machine I can connect to the tftp server but the transfer of the file fails:
tftp myserver.mydomain.local -m binary -c get file1.txt /dev/stdout Transfer timed out.
And then
tftp myserver.mydomain.local tftp> mode binary tftp> trace Packet tracing on. tftp> literal Literal mode on. tftp> status Connected to myserver.mydomain.local. Mode: octet Verbose: off Tracing: on Literal: on Rexmt-interval: 5 seconds, Max-timeout: 25 seconds tftp> verbose Verbose mode on. tftp> get file1.txt getting from myserver.mydomain.local:file1.txt to file1.txt [octet] sent RRQ <file=file1.txt, mode=octet> sent RRQ <file=file1.txt, mode=octet> sent RRQ <file=file1.txt, mode=octet> sent RRQ <file=file1.txt, mode=octet> sent RRQ <file=file1.txt, mode=octet> Transfer timed out.
What can I do to further analyse the problem ?
Regards,
Meikel
Hello Meikei,
I'm by no means an expert in TFTP. I used it for a while when I was dealing with LTSP back before PXE Boot became more widely used. I did find this, however, that /might/ lead you in the right direction. Does the client have a `firewalld` rule as well?
https://blog.thewatertower.org/2019/05/01/tftp-part-2-the-tftp-client-requir...
Hope this helps you a little anyway.
Thanks, Steven Spencer
Hi Steven.
Le 21/12/2021 à 17:16, Steven Spencer via rocky a écrit :
Does the client have a `firewalld` rule as well?
I had this already in mind but expected there is no firewall on the client. Anyway I did check on the client:
sudo systemctl stop firewalld.service
tftp myserver.mydomain.local -m binary -c get file1.txt /dev/stdout Hello File 1
sudo systemctl start firewalld.service
tftp myserver.mydomain.local -m binary -c get file1.txt /dev/stdout Transfer timed out.
So obviously the firewall on the client is the problem. Oh man, so easy :-( Thanks for the solution.
I' m only wondering what the "status" indicates in case the firewall rules are active:
tftp myserver.mydomain.local tftp> status Connected to myserver.mydomain.local. Mode: netascii Verbose: off Tracing: off Literal: off Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
Maybe the message "Connected to myserver.mydomain.local." is a bit misleading and therefore I didn't follow the idea with a firewall in the way.
Regards,
Meikel