Skip to content

[os-tftp] Serve directory is incorrect or symlink to /tftpboot is broken out of the box #5510

Description

@zackdotgomez
  • I have read the contributing guidelines.
  • I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • The title contains the plugin to which this issue belongs

*Describe the bug

  • os-tftp simply does not work - it says it's running but doesn't serve files from /usr/local/tftp

  • I have resolved the bug manually by inspecting inetd and creating a symlink from /tftpboot

  • My current running-config is an older OPNsense config, imported via XML to a fresh appliance on the same hardware

  • I have inspected that old config file and found no references to /tftpboot, inetd or /usr/local/tftp

  • All plugin and OS settings in that old config file are correct

  • It seems unlikely that the act of restoring from an older version config contributed

  • TFTP worked in the prior iteration and likely broke during the restoration, but was not used until now

  • During troubleshooting I updated OPNsense minor versions from 26.5 to 26.10 and reinstalled the os-tftp plugin

  • Neither update action appeared to alter behavior or config files

Use opnsense-revert

  • Not attempted; unable to revert to previous config for reasons unrelated to bug. Prior install was virt on Proxmox. Current install is bare metal on the same machine. Due to this and broader network topology changes, reverting would create unacceptable disruption/breaking changes in my home network.

To Reproduce
Steps to reproduce the behavior:

  1. Test your TFTP server: does it work? If yes, good! If no,
  2. Examine your os-tftp settings and read the GUI hint for the serve dir. What is it?
  3. Make sure it exists (should be /usr/local/tftp), put something in it and test TFTP again
  4. SSH into the system and run grep tftp /etc/inetd.conf
  5. Examine the printed lines for the served directory
  6. Examine / for tftpboot

If there is no symlink from /tftpboot to /usr/local/tftp, you have the same bug.

Expected behavior
Expected files to be served out of /usr/local/tftp as shown in GUI.
Expected that directory to be hardcoded in the config, not symlinked.

Environment
OPNsense 26 running bare metal on a Lenovo mini PC. Config imported from OPNsense 25 which, previously, was virtualized over Proxmox on the same PC. On prior iteration, OPNsense was successfully and reliably serving to PXE clients via TFTP. Migration included moving from ISC to dnsmasq. Today I attempted to use PXE boot for the first time since migration, was unable to contact the TFTP server, and began troubleshooting. I found I had simply never reconfigured it during migration, located OPNsense's docs, and began following them to configure TFTP. I nc'd some files into /usr/local/tftp but found I was still unable to contact the server.

Additional information
Had I known the directories were symlinked prior to troubleshooting I would have checked for the symlink earlier.
I took no destructive actions and can't think of any step I did that could have destroyed the symlink.
I did run service tftp onerestart when attempting to diagnose.

I haven't tried to reproduce this issue directly yet but will update the thread later

Throwing in my hat for #2500 and #2501 "support setting the tftp directory" by @razamatan.
Support exposing this information in GUI.

Screenshots
N/A

Relevant log files
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions