[syslinux] tftp problems

Ray McCaffity summitflier at yahoo.com
Mon Nov 20 15:17:27 PST 2023


 Thanks, I will give those a try.

    On Monday, November 20, 2023 at 02:25:55 PM PST, Steve Rikli <sr at genyosha.net> wrote:  
 
 I've used TFTP server on CentOS/RHEL 7 and 8 but not 9, so take my notes
with the appropriate grain of salt...

JIC, confirm on the TFTP server you have a process socket for it, e.g.

  $ netstat -a | grep tftp
  udp        0      0 0.0.0.0:tftp            0.0.0.0:*

Your 'systemctl status' output implies things are OK, but worth a check.

I don't see a "tftpboot" symlink pointing to "." in your tftpd directory
listing, e.g. something like:

  $ ls -la /var/lib/tftpboot/
  total 4
  drwxr-xr-x  9 root root  156 Mar 31  2021 .
  dr-xr-xr-x. 21 root root 4096 Nov  9 07:48 ..
      [ other examples deleted for brevity ]
  lrwxrwxrwx  1 root root    1 Oct 27  2010 tftpboot -> .

I don't think that's strictly required anymore, but I've carried that
symlink around on my Kickstart TFTP servers for years.

I'm sure you're aware, being able to download from the local system but
not remote clients, usually points at some kind of firewall or socket
listening problem.  I'd double-check again the results with the firewall
(Linux as well as any network devices) out of the picture JIC.

If you're looking at changing the TFTP daemon startup (e.g. adding "-v"
flags for logging verbosity, which can help) I have done things like
this on systemD-using systems (i.e. where tftpd is not spawned by xinetd
or similar):

  cp -i /usr/lib/systemd/system/tftp.service /etc/systemd/system/
  vi /etc/systemd/system/tftp.service
  [ edit ]
#ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot -vv
  [ edit end ]

and then restart or reboot as desired.

So, no definitive solutions to your problem here, but maybe a little
troubleshooting help. Good luck!

sr.


On Mon, Nov 20, 2023 at 08:44:55PM +0000, Ray McCaffity via Syslinux wrote:
> Hello,
>    I am a fairly experienced user.  I have set up tftp in the past at various times, although it's been a few years.
> I am using version...
> Version      : 5.2
> Release      : 37.el9
> 
> On AlmaLinux 9.3, I currently have SELinux disabled.
> ]# firewall-cmd --list-services
> cockpit dhcp dhcpv6-client http ssh tftp
> 
> I have tftp enabled on the firewall.  ( I have tried with the firewall completely disabled also )
> I can get a file locally on the tftp server, as any user, even non-root.I cannot get any file remotely from any other system.  These are all Linux systems running either Fedora 39 or Alma 9.3
> I get the same results on a Fedora 39 system, also with tftp-server installed.
> This is the message from any client.
> 
> tftp 10.0.0.133
> tftp> verbose
> Verbose mode on.
> tftp> trace
> Packet tracing on.
> tftp> status
> Connected to 10.0.0.133.
> Mode: netascii Verbose: on Tracing: on Literal: off
> Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
> tftp> get test.txt
> getting from 10.0.0.133:test.txt to test.txt [netascii]
> sent RRQ <file=test.txt, mode=netascii>
> sent RRQ <file=test.txt, mode=netascii>
> sent RRQ <file=test.txt, mode=netascii>
> sent RRQ <file=test.txt, mode=netascii>
> sent RRQ <file=test.txt, mode=netascii>
> Transfer timed out.
> 
> 
> This is on the server.
> 
> # systemctl status -l tftp.socket
> ● tftp.socket - Tftp Server Activation Socket
>      Loaded: loaded (/usr/lib/systemd/system/tftp.socket; enabled; preset: disabled)
>      Active: active (listening) since Mon 2023-11-20 12:37:31 PST; 20s ago
>       Until: Mon 2023-11-20 12:37:31 PST; 20s ago
>    Triggers: ● tftp.service
>      Listen: [::]:69 (Datagram)
>       Tasks: 0 (limit: 48181)
>      Memory: 4.0K
>         CPU: 328us
>      CGroup: /system.slice/tftp.socket
> 
> Nov 20 12:37:31 labKickstart1 systemd[1]: Listening on Tftp Server Activation Socket.
> Permissions of /var/lib/tftpboot
> drwxrwxrwx.  4 root           root             49 Nov 20 12:26 tftpboot
> Permissions of files in this directory.
> ls -l /var/lib/tftpboot/
> total 12
> drwxrwxrwx 7 root root 4096 Nov 16 13:10 efi
> drwxrwxrwx 4 root root 4096 Nov 16 13:10 pxelinux
> -rwxrwxrwx 1 root root   23 Nov 16 13:10 test.txt
> 
> These are my systemd service files.
> # systemctl cat tftp.service
> # /usr/lib/systemd/system/tftp.service
> [Unit]
> Description=Tftp Server
> Requires=tftp.socket
> Documentation=man:in.tftpd
> 
> [Service]
> ExecStart=/usr/sbin/in.tftpd -c /var/lib/tftpboot
> StandardInput=socket
> 
> [Install]
> Also=tftp.socket
> ===================================
> 
> systemctl cat tftp.socket
> # /usr/lib/systemd/system/tftp.socket
> [Unit]
> Description=Tftp Server Activation Socket
> 
> [Socket]
> ListenDatagram=69
> 
> [Install]
> WantedBy=sockets.target
> 
> I have searched several web pages all over the web, but most have examples for either a/etc/xinetd/tftp-hpa file, or a /etc/default/tftp file.  I do not have either of these.
> Ray McCaffitysummitflier at yahoo.com
  


More information about the Syslinux mailing list