Baza wiedzy
AVM Content
Setting up a WireGuard VPN between two FRITZ!Box networks
Our step-by-step guide on how to easily and securely connect two FRITZ!Box networks over VPN (WireGuard). ✓
WireGuard allows you to connect two FRITZ!Box networks at different locations over the internet via a secure, encrypted VPN connection (LAN-LAN linkup). This allows you to access all of the devices in the remote network and use all of the IP-based services such as email servers, data banks, and file servers at both locations.
You can find an overview of additional VPN connection options in our guide VPN with FRITZ!.
Example values used in this guide
In this guide we show you how to connect "FRITZ!Box A" in a branch with "FRITZ!Box B" in the headquarters. When setting up the connection, replace the values used in this guide with your actual values.
Requirements / Restrictions
- FRITZ!Box B (headquarters) must obtain either an IPv6 address or a public IPv4 address from the internet service provider. FRITZ!Box A (branch) must obtain an IP address with the same protocol version (IPv4 or IPv6) from the internet service provider.
- FRITZ!OS 7.50 or later is installed on both of the FRITZ!Boxes.
- The FRITZ!Box 7490 does not support the options "Send all IPv4 network traffic via the VPN connection " and "Only certain devices in the home network are to be accessible over this WireGuard connection".
Note:All instructions on configuration and settings given in this guide refer to the latest FRITZ!OS for the FRITZ!Box.
1 Preparations
Configuring MyFRITZ!
Register the FRITZ!Boxes with MyFRITZ!Net so that they can always be reached on the internet at fixed MyFRITZ! addresses:
- Click "Internet" in the FRITZ!Box user interface.
- Click "MyFRITZ! Account" in the "Internet" menu.
- Enter your email address in the "Your email address" field.
- Click "Apply". Now MyFRITZ!Net sends you an email with the confirmation link to your FRITZ!Box.
Important:If you do not receive an email, the email was classified as unsolicited advertising (spam). In this case, check the spam folder of your email inbox.
- Open the email you received from MyFRITZ!Net.
- Click the "Register Your FRITZ!Box" button in the email.
Adapting the IP networks
VPN communication is not possible if both FRITZ!Boxes use the same IP network. Since all FRITZ!Boxes use the IP network 192.168.178.0 in the factory settings, configure IP addresses from different IP networks in the FRITZ!Boxes:
Example:
In this guide, FRITZ!Box A (branch) has the IP address 192.168.20.1 (subnet mask 255.255.255.0) and FRITZ!Box B (headquarters) the IP address 192.168.10.1 (subnet mask 255.255.255.0).
- Click "Home Network" in the FRITZ!Box user interface.
- Click "Network" in the "Home Network" menu.
- Click on the "Network Settings" tab.
- Click "Additional Settings" in the section "LAN Settings" to display all of the settings.
- Click the "IPv4 Settings" button.
- Enter the desired IP address and subnet mask.
- Click "Apply" to save the settings and on the FRITZ!Box, confirm that the procedure may be executed, if you are asked to do so.
2 Downloading WireGuard settings from FRITZ!Box A (branch)
The following steps are only necessary if WireGuard connections are already configured in FRITZ!Box A (branch) (for example for a mobile device):
- Click "Internet" in the user interface of FRITZ!Box A (branch).
- Click "Permit Access" in the "Internet" menu.
- Click on the "VPN (WireGuard)" tab.
- Click the "Display WireGuard Settings" button.
- If you are asked to do so, on the FRITZ!Box confirm that the procedure may be executed and click "OK" to complete the procedure.
- Click "Download Configuration File" and download the file with the extension ".conf" to the computer.
3 Configuring FRITZ!Box B (headquarters)
- Click "Internet" in the user interface of FRITZ!Box B (headquarters).
- Click "Permit Access" in the "Internet" menu.
- Click on the "VPN (WireGuard)" tab.
- Click the "Add Connection" button.
- Click "Connect networks or establish special connections" and then "Next".
- By "Has this WireGuard connection already been set up at the remote connection?", click "No".
- If no WireGuard connections have been set up in FRITZ!Box A (branch) yet:
- By "Should the new WireGuard connection be used used concurrently with an existing connection on the remote site?", click "No".
- By "Is the connection to be made with a single device (laptop, smartphone, tablet), or a router that supports WireGuard (such as a FRITZ!Box)?", click "Router with WireGuard support".
- Click "Next".
- Enter a unique name for the connection (FRITZ!Box branch) in the field "Name of the WireGuard connection".
- Enter the IP network of FRITZ!Box A (192.168.20.0) in the "Remote network" field.
- In the "Subnet mask" field, enter the subnet mask that corresponds to FRITZ!Box A's IP network (255.255.255.0).
- If WireGuard connections have already been set up in FRITZ!Box A (branch):
- By "Should the new WireGuard connection be used used concurrently with an existing connection on the remote site?", click "Yes".
- Click "Yes" by "Should the settings file of the remote site be imported and the new connection be appended automatically?".
- Click "Next".
- Enter a unique name for the connection (FRITZ!Box branch) in the field "Name of the WireGuard connection".
- Click the "Choose File" or "Browse..." button.
- Select the settings file for the WireGuard connection that you downloaded from FRITZ!Box A (Conf file) and click "Open".
- If available, enable the option "Allow NetBIOS over this connection".
- If only certain devices in the home network of FRITZ!Box B (headquarters) should be reachable via VPN, enable the option "Only certain devices in the home network are to be accessible over this WireGuard connection" and select the corresponding devices.
- Click the "Finish" button.
- If you are asked to do so, on the FRITZ!Box confirm that the procedure may be executed and click "OK" to complete the procedure.
- Click "Download Settings" and download the file with the extension ".conf" to the computer.
4 Configuring FRITZ!Box A (branch)
- Click "Internet" in the user interface of FRITZ!Box A (branch).
- Click "Permit Access" in the "Internet" menu.
- Click on the "VPN (WireGuard)" tab.
- Click the "Add Connection" button.
- Click "Connect networks or establish special connections" and then "Next".
- By "Has this WireGuard connection already been set up at the remote connection?", click "Yes".
- Click "Next".
- Enter a unique name for the connection (FRITZ!Box headquarters) in the field "Name of the WireGuard connection".
- Click the "Choose File" or "Browse..." button.
- Select the settings file for the WireGuard connection that you downloaded from FRITZ!Box B (Conf file) and click "Open".
- Click the "Finish" button.
- If you are asked to do so, on the FRITZ!Box confirm that the procedure may be executed and click "OK" to complete the procedure.
Now the VPN connection between both FRITZ!Boxes is configured and FRITZ!Box A (branch) is permanently connected to FRITZ!Box B (headquarters).