wireguard from fritzbox to a external server

In a previous post I described the wireguard vpn on android with fritzbox setup ...

Well, but what to do if your provider uses a IPv4 shared address space for your internet connection and therefore your clients are unable to reach it from the public IP space? Or the daily changing IP of your internet access is too annoying, as it cuts the VPN connection and requires a restart?

Well, if you like, you can configure a small server on the internet as a VPN access point, allowing your clients to access your fritzbox or even devices located in your home network.

Sample setup:

VPN-Client ------ PublicServer ------- FritzBox ----- HomeNetwork
 WG             PubIP      WG       or

Well, first you configure your Wireguard Server as usually and define at least 2 Pees:

Your VPN-Client can be configured as usually and will not be covered here.

But now to the FritzBox Wireguard configuration ... well the manufacturer AVM did not make this easy ... You can easily configure a WG VPN connection between 2 FritzBoxes, buit for the connection to a external VPN server you will have to generate a VPN config to import it into your fritzbox. For our sample setup this might look like this:

PrivateKey = PRIVATEKEYFORTHEFRITZBOXCLIENT # (you can generate the private and public key on the server)
Address = # the IP of the fritzbox in your home network

PresharedKey = OPTIONALaPreSharedKey
AllowedIPs =
Endpoint = PubIPorDNSNameOfYourServer:ListenPortConfiguredOnTheServer
PersistentKeepalive = 25

Well, now you can configure the wireguard VPN on your fritzbox:

Internet > Permit Access > VPN (WireGuard) > Add Connection > User-defined setup > Has this WireGuard® connection already been set up at the remote connection? Yes > set a name and import your config > Finish

BTW: if the fritzbox is unable to establish a connection to the wireguard server, it will not save the connection!