1

I have a Docker container with tftp client on Host#1 with IP 10.10.10.10. I have a file and a tftp server on Host#2 with IP 11.11.11.11

I want to be able to download file from Host#2 with this tftp client inside Docker container.

The main problem is that tftp uses port 69 only as a control port, but sends data on ephemeral ports. Thus, I tftp client is able to ask the server to send the file, but then can't receive the file itself and catches timeout.

So how do I download this file with tftp?

I know two solutions for now. First, using --net=host. I do not want to use it because of security (and not only) concerns. Second, publishing ephemeral ports 49152-65535. It's hard to make it work if anything else on host uses any of these ephemeral ports.

Also, it is everything fine with Firewall!

  • did you ever resolve this? – danielRicado Jul 24 '23 at 02:38
  • @danielRicado Unfortunately, it does not seem possible to resolve this otherwise than to move away from TFTP – Oleksiy Svintsitskiy Jul 25 '23 at 07:27
  • hey I found out it's a windows problem. using alpine:latest, ports 69:69/udp and network mode not set / default it began working. turns out the issue is with windows/wsl2 and its ability to provide a port. Once I tested it directly on a pi running debian it all worked just fine. So the mystery at least in my case was the windows environment – danielRicado Jul 25 '23 at 20:43

0 Answers0