FRITZ!Box 7520 TFTP request does not find my computer

Hi,

I am trying to install OpenWRT on a FRITZ!Box 7520. Following https://openwrt.org/toh/avm/avm_fritz_box_7530 I have used eva_ramboot.py to push UBoot and now I can verify with wireshark that the router is trying to fetch the FRITZ7520.bin file with TFTP. I have set my IP to 192.168.1.70/24 but for some reason the request does not get to my TFTP server on my computer. I have confirmed that the TFTP server works and I have pinged the router with my IP set and can see in wireshark that the router responds to this IP and ping receives this response. Confused.

Firewall blocking TFTP requests?

Make sure you completely disable the firewall on your local computer.

Also, the only connection should be ethernet between your computer and the FB7520, no other connections.

Hi, thanks for the quick reply. I have no firewall.

BTW, image from Wireshark:

What OS are you running?

Arch Linux. And I have disabled Wifi so the ethernet is the only LAN:

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: wlp166s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether aa:0f:dd:1c:71:12 brd ff:ff:ff:ff:ff:ff permaddr 04:cf:4b:20:23:0d
    altname wlx04cf4b20230d
18: enp0s13f0u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 1a:5b:ac:a7:ea:dc brd ff:ff:ff:ff:ff:ff permaddr 9c:bf:0d:00:0e:ae
    altname enx9cbf0d000eae
    inet 192.168.1.70/24 brd 192.168.1.255 scope global noprefixroute enp0s13f0u1
       valid_lft forever preferred_lft forever

Well, the router's polling the file, but your TFTP doesn't seem to be responding...

As far as I can see, it's not Openwrt related.

Yes, it is almost certainly an issue with my setup, but I would still like help :sweat_smile:

I'd still like you to check if the fw was really down.

OK, that would be iptables, right?

# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Have you verified that your tftp server is actually running?

Yes, I used the tftp client to verify it and successfully fetched the FRITZ7520.bin file as described on https://openwrt.org/docs/guide-user/troubleshooting/tftpserver#testing_tftp_server_on_linux. That was from the same computer though, I don't have another one for better testing unfortunately.

Got no iptables knowledge, but should every counter be 0 ?

Yes, https://wiki.archlinux.org/title/Iptables#Showing_the_current_rules

Hello there,

While we're helping one another out, I read someone mentioning checking on the TFTP-Server so I was hoping someone could help me find out why my TFTP-Server isn't working properly, please?

I tried the

tftp localhost / 127.0.0.1 / 192.168.1.1
get FRITZ7520.bin
but I keep getting Timed out messages

I am using ubuntu 22.04 (freshly installed), and whenever I try to run this command:

dnsmasq --listen-address=0.0.0.0 --port=0 --enable-tftp --tftp-root=/srv/tftp --tftp-no-blocksize --user=root --group=root

I get some errors about dnsmasq not being able to work because port 53 is already in use because of systemd-resolve, so I run:

sudo systemctl stop systemd-resolve

And after that the dnsmasq command works, but TFTP-Server doesn't work.

So far I've done this:

HOST Static IP 192.168.178.10 -> run ramboot.py -> works
HOST Static IP 192.168.1.10 -> run dnsmasq -> works
TFTP-Server -> doesn't seem to work

I'd greatly appreciate help on how I could eventually solve this. Thanks a lot in forward

it works for me on arch linux, all I do is edit /etc/dnsmasq.conf , just changed these lines

interface=enp0s13f0u1

enable-tftp

tftp-root=/srv/tftp

Then just start/restart the server:

systemctl stop dnsmasq
systemctl start dnsmasq

off she goes

though you still probably have to do :

systemctl stop systemd-resolve

That is not right, --port=0 should disable the dns functionality entirely. Can you send the exact error?

Hello, I get the error that port :53 is being used

When I look for port :53 it's the systemd-resolved that's using it
So I disable systemd-resolved

And after that I can do the dnsmasq command.... however

I recently found out I had to install tftpd-hpa, and now with that service running it is using port :69

So now when I run dnsmasq command, not only I have to take care of shutting down systemd-resolved on port :53, but I also have to kill the PID of tftpd-hpa on port :69, otherwise dnsmaqs command won't run.

And without tftpd-hpa running on port :69, I keep getting "Transfer request timed out"

So I'm kind of stuck in a loop here.

I can gladly make a complete new post about this, because I think it's something bigger and different topic than the Author from this post and I wouldn't like to mess with his solutions and help.

Please let me know what you think

I am the author, I will allow it :slightly_smiling_face:

Can you send a screenshot or text copy of the exact command you ran and exact output?

Thank you a lot for your kindness.

Yes of course.

These are the commands I ran:

  1. download tftp-hpa
    1.a) sudo systemctl enable tftp-hpa.service
    1.b) sudo systemctl start tftp-hpa.service

  2. STATIC IP -> 192.168.178.10 | SUBNET: 255.255.255.0 | GATEWAY: 192.168.178.1
    2.a) ping 192.168.178.1 -a
    2.b) chmod +x * (initrafms, .py and uboot.bin)
    2.c) ./eva_ramboot.py --offset 0x85000000 192.168.178.1 uboot-fritz7520.bin (not 7530)

-> message output something along the lines worked

2.d) initrafms file rename to FRITZ7520.bin
2.e) mv FRITZ7520.bin /srv/tftp/
2.f) sudo chmod -R nobody:nogroup /srv/tftp/
2.g) sudo chown -777 /srv/tftp
2...) chmod and chown also for FRITZ7520.bin file

  1. STATIC IP -> 192.168.1.70 | SUBNET: 255.255.255.0 | GATEWAY: 192.168.1.1
    3.a) disconnect / connect to LAN for IP changes to take effect
    3.b) ping 192.168.1.1 -a
    3.c) sudo systemctl stop systemd-resolve
    3.d) dnsmasq --listen-address=0.0.0.0 --port=0 --enable-tftp --tftp-root=/srv/tftp --tftp-no-blocksize --user=root --group=root
    "failed to create listening socket for port 69: Address already in use"
    3.e) sudo netstat -lunp | grep 69
    3.f) here in.tftpd is being shown on port 69, so I kill the processes and run the dnsmasq command again

3.g) tftp 192.168.1.1

tftp > put FRITZ7520.bin

Transfer request timed out.

I can only run dnsmasq or tftpd on port 69 and no matter which one I run, I always get Transfer request timed out.

However, I must say, when tftpd is running on port 69 and I do
"tftp 127.0.0.1

tftp > get/put FRITZ7520.bin
tftp >"
I don't get Transfer request timed out, locally it seems to work.

I also tried fritz-tools (https://fritz-tools.readthedocs.io/en/latest/flashing/ubuntu_1804.html) but I got the error "Unknown Model 247!"

Not sure where, but I can also gladly offer to upload my journalctl log throughout this lil 5-10 minute prepared journey