opnsense / opnsense/plugins

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

Open
#5,510 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
863
Avg merge
2d 6h
Merged PRs (30d)
10

Description

  • 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with the GUI serve directory set to /usr/local/tftp, then inspect /etc/inetd.conf and whether /tftpboot exists or links to it. Verify that TFTP serves files from /usr/local/tftp as shown in the GUI without relying on a symlink.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.