TFTP configuration problems

107

Solution 1

I ended up following this guide that explains that openbsd-inetd should be installed as well and I also had to set RUN_DAEMON="yes" in my tftp config file at /etc/default/tftpd-hpa.

UPDATE #1

The above link no longer worked so I found an alternative here, titled: Running TFTP Server on Ubuntu 12.04 LTS (Precise) UPDATE.

Solution 2

I've had to deal with this myself a few times recently and these are the questions I've asked myself to trouble shoot:

  • is tftpd run from xinetd or as an independent daemon?
  • do you need to alter /etc/hosts.allow or hosts.deny
  • is SELinux enabled (check with "getenforce" command)?
  • is there a host firewall running? (service iptables status)
  • are you sure of the directory tftpd is useing as it's data dir?
  • does the file you are attempting to "get" actually exist?

My bet is on a combination of the above. Like firewall and SELinux and data directory location.

You do not want /srv to be open with modes 0777. And you don't need to do that with the tftp data dir, either. You'll only need to the files readable by world. Unless you are putting files onto the server. In that case, you must create the files ahead of time and make them world writable while you are writing them.

Good luck!

Solution 3

I just had this problem on Debian Jessie: "Transfer timed out.".

In /etc/default/tftpd-hpa, there is a line for the address: TFTP_ADDRESS="0.0.0.0:69".

Replace it with the full server address. For example:

TFTP_ADDRESS="192.168.99.10:69"

And restart the daemon. That seems to have fixed it for me.

This variable in Debian sets the --address option to the daemon. You may need to set it differently on a different distribution, but in the end you should see the address when doing ps x:

# ps x | grep tftp
3988 ?        Ss     0:00 /usr/sbin/in.tftpd --listen --user tftp --address 192.168.99.10:69 --secure /docs/tftp-pxe

Looks like a bug in either the server or the client.

Share:
107

Related videos on Youtube

naasking
Author by

naasking

Updated on September 18, 2022

Comments

  • naasking
    naasking almost 2 years

    I have a CSV file I want to load at boot of my Lift app, but I can't figure out where to place this file. I've tried putting it under src\main\resources and then using LiftRules.getResource/doWithResource, but no dice (I get a MalformedURLException).

    What's the standard way to do this in Lift?

    • slm
      slm over 10 years
      What's the underlying OS? Might be an issue with app armor of SELinux blocking access to this directory. Also I don't think it should matter but what's the owner/group for the dir. /srv/tftp? Should be nobody:nobody.
    • dribler
      dribler over 10 years
      My preference is atftpd it seems to have better logging, and better defaults for timeouts. In any case, start your debugging by looking at wireshark/tcpdump maybe? tftp has no encryption, so you should be able to see exactly what is going on.
  • stdcerr
    stdcerr over 10 years
    Well, since I can establish a session with tftp 127.0.0.1 I assume that the daemon is working properly... no iptables firewall running (this is an out of the box Ubuntu install, so SELinux shouldn't be the issue either). My config file /etc/default/tftpd-hpa says TFTP_DIRECTORY="/srv/tftp" but # ps ax | grep tftpd doesn't return anything (other than the instance of grep) :o that's odd, so how would I be able to establish a cionnection then?