Enabling TFTP on dnsmasq breaks DHCP

To try PXE boot, I enabled TFTP server over on LuCi, but it stopped leasing any IPv4 addresses. This what I had to do to make it work again:

Any idea why? I do have DNSCrypt-Proxy installed, but I noticed dnsmasq isn't even configured to use it when I checked, so that can't be it...

A wee bump. Anyone familiar with TFTP?

Check the logs. If you do not specify the tftp root directory correctly (using an absolute path), dnsmasq fails to start.

1 Like

I've tried with both /mnt/sda1 and /mnt/sda1/, to same effect. I've confirmed mount point is available, I copied file to it over SSH.

checked permissions ?

Good point, no I haven't. What permission does it need to be in?

since it's only temp, I'd carpet bomb, and use 777 :wink:

check /mnt/sda1 permissions too.

1 Like

After some googling, I found this:

First was solving the permissions issue. I created a dedicated directory at /var/tftp and changed the ownership to ’nobody’ and ’nogroup’ and mode too ‘0755’.

I'll try the 0755 thing, and if it doesn't work out, I'll "carpet bomb" as you say. But not now, now's not a good time to mess around with connectivity issues. And hopefully I remember how to set permission by the time I can (chmod?).

Mount permission? Something else? I'll be setting permission on sda1/ as that will be the TFTP root.

permissions for the mount point, and the file(s) inside.

So far, so good. Did the following per that link's instructions, and DHCP seems to be in working order. It's way past midnight to avoid any possible disruptions. I'll try to PXE boot something tomorrow and mark it as solved then. Thanks for the permissions lead!

~# chown -R nobody:nogroup /mnt/sda1/
~# chmod -R 0755 /mnt/sda1/

# /etc/config/dhcp
uci set dhcp.cfg01411c.enable_tftp='1'
uci set dhcp.cfg01411c.tftp_root='/mnt/sda1/'
uci set dhcp.cfg01411c.dhcp_boot='netboot.xyz.efi'

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.