FritzBox lanprefix

Hello everyone,

I have switched my home server from Linux to Windows. This was due to services that could not run there or could only be used with reduced performance.

I have not yet found a suitable updater for DynDNS and wanted to implement this via the router.

Unfortunately, I can apparently only make the IPv4 known, as only the IPv6 of the router itself is possible with v6.

Is there a way to store the interface ID of the server? If not, is there a good way to synchronise the IP addresses under Windows with desec?

Why don’t you take a look at this one? It’s programmed in Python and also runs as an executable under Windows.
Alternatively, take a look at the API documentation; there you’ll find the call that you can also enter in the Fritzbox (everything’s there; I use exactly these calls in Python).

Thanks for the feedback and tips

I would use that:
https://update.dedyn.io/?myipv4=&myipv6=</64>

From the documentary:
In some cases, it is useful to only update the network prefix of existing A or AAAA records. To achieve this, append the prefix length to the IP address query parameter, such as ipv6=2a01:a:b:c::1/64.

If I have understood this correctly, it should work with the URL mentioned above.

The AAAA record is set and if the prefix changes, only this should be updated in the address?
IPv6 is also still quite new to me. Until recently, I still had a v4 without dual stack.

The FRITZ!Box dynDNS support only offers to update the public IPv4 and IPv6 addresses of the device itself. But LAN devices usually get public IPv6 addresses from a separate IPv6 prefix allocated to the Internet connection by the ISP.

Typically the FRITZ!Box will get a /64 prefix for itself and combine that with its Interface Identifier (IID) to form its public IPv6 address. It will receive e.g. a separate /56 prefix for its LAN clients, of which a /64 is passed on to the clients. The clients then supply the IID to form the complete public IPv6 address.

So if you want to host an Internet-reachable service on a LAN device using IPv6 you need to solve a few challenges:

  • The LAN client needs to update dynDNS itself. But you can update a subdomain and let the FRITZ!Box keep updating the domain apex or a different subdomain. So no conflicts there.
  • Per default most modern OSes use IPv6 privacy extentions. That means their public IPv6 addresses (actually only the IIDs) will change often. Also an interface will normally have more than one public IPv6 address, with the newest one being used for new outgoing connections. That does not work very well with the port forwarding system of FRITZ!OS because you need to specify a (preferably static) IID to identify the LAN host. So you need to configure the interface to use an EUI64 or a manual IID, while still updating the prefix when it changes, and turn off the IPv6 privacy extensions. How that can be done depends on the OS.
  • Depending on how the service itself is configured, you may need to update its LISTEN address when the public IPv6 prefix changes.
  • You still need to configure port forwarding on the FRITZ!Box as by default IPv6 packets from the Internet that are not responses to outgoing requests will be blocked.

I have done all this on OpenBSD. But I have no idea about the details on Windows. dynDNS clients are out there, so that part should be easy.

HTH
fiwswe

That used to be true, but recent firmwares can send the LAN prefix too. It’s documented here (in German). This can be combined with the prefix length notation already mentioned by @serv to have the Fritzbox update one IPv6 address record with the proper LAN address, assuming the device uses a static interface identifier.

1 Like

Interesting! I stand corrected.