Knowledge Base
AVM Content
- FRITZ!Box 7690
- FRITZ!Box 7590 AX
- FRITZ!Box 7590
- FRITZ!Box 7583 VDSL
- FRITZ!Box 7583
- FRITZ!Box 7582
- FRITZ!Box 7581
- FRITZ!Box 7560
- FRITZ!Box 7530 AX
- FRITZ!Box 7530
- FRITZ!Box 7520
- FRITZ!Box 7490
- FRITZ!Box 7430
- FRITZ!Box 7390
- FRITZ!Box 7360
- FRITZ!Box 6890 LTE
- FRITZ!Box 6850 5G
- FRITZ!Box 6850 LTE
Setting up a VPN between two FRITZ!Boxes for individual LAN ports
When you set up a VPN connection between two FRITZ!Box networks, you can also restrict the VPN tunnel to individual LAN ports on the FRITZ!Boxes.
This allows you, for example, to connect a home office or a POS system in one branch with the headquarters by means of a securely encrypted VPN tunnel, without allowing other devices in the branch to access the headquarters.
ATTENTION!The LAN ports used for VPN can then only be used to access the remote network, but not devices in the local network. These LAN ports are also no longer able to use the local FRITZ!Box to access the internet.
Example values used in this guide
In this guide we show you how to connect devices connected to the "LAN 2" port of "FRITZ!Box A" in a branch office with "FRITZ!Box B" in the headquarters. When setting up the connection, replace the values used in this example with your actual values.
- MyFRITZ! address of FRITZ!Box A (branch):
pi80ewgfi72d2os42.myfritz.net - IP network of FRITZ!Box A (branch):
192.168.20.0 (subnet mask: 255.255.255.0) - IP network of the "LAN 2" port on FRITZ!Box A (branch):
192.168.21.0 (subnet mask: 255.255.255.0) - MyFRITZ! address of FRITZ!Box B (headquarters):
kw23qbmnj31x5aw75.myfritz.net - IP network of FRITZ!Box B (headquarters):
192.168.10.0 (subnet mask: 255.255.255.0) - VPN password (pre-shared key):
secret1234
Requirements / Restrictions
- At least one of the two FRITZ!Boxes must obtain a public IPv4 address from the internet service provider.
- FRITZ!OS 6.20 or later is installed on FRITZ!Box B.
- On the LAN ports selected for VPN, the entire network traffic is forwarded to the remote FRITZ!Box via the VPN 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! so that it can be reached on the internet at any time at fixed MyFRITZ! addresses:
- Create a MyFRITZ! account and set it up in both of the FRITZ!Boxes.
Note:You can either configure the same or different MyFRITZ! accounts in both of the FRITZ!Boxes. Even if both FRITZ!Boxes use the same MyFRITZ! account, each FRITZ!Box has its own unique MyFRITZ! address.
Adjusting 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.
Important:Do not enter an IP address from the network 192.168.100.x. In compliance with DOCSIS, this network is reserved for the cable provider and may not be used in the FRITZ!Box.
- Click "OK" to save the settings and on the FRITZ!Box, confirm that the procedure may be executed, if you are asked to do so.
2 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" tab.
- Click the "Add VPN Connection" button.
- Click "Connect your home network with another FRITZ!Box network (LAN-LAN linkup)" and then "Next".
- In the field "VPN password (pre-shared key)", enter the password required to establish the VPN connection (secret1234). Use numerals and letters, and combine capitals and lower-case letters.
- Enter a unique name for the connection (FRITZ!Box headquarters) in the field "Name of the VPN connection".
- Enter the MyFRITZ! address of FRITZ!Box B (kw23qbmnj31x5aw75.myfritz.net) in the field "Web address of the remote site".
- Enter the IP network of FRITZ!Box B (192.168.10.0) in the "Remote network" field. If the VPN tunnel should be limited to certain LAN ports on FRITZ!Box B, enter the network prefix of these LAN ports (192.168.11.0).
- In the "Subnet mask" field, enter the subnet mask that corresponds to FRITZ!Box B's IP network (255.255.255.0).
- If you want to maintain the VPN connection to FRITZ!Box B all the time, enable the option "Hold VPN connection permanently".
- Enable the option "Allow NetBIOS over this connection (for Microsoft Windows file and printer sharing)" if access to SMB shared files in the remote network should be allowed.
- Click "Advanced Settings for Network Traffic".
- If only certain devices should be allowed to access the remote network, enable the option "Only certain devices use the VPN connection" and select the corresponding devices.
- Enable the option "VPN tunnel is available only at the selected LAN ports of the FRITZ!Box".
- Select the LAN ports for which the VPN tunnel should be available.
- In the "Network prefix" field, enter the IP network to be used by the LAN ports you selected (192.168.21.0).
- In the field "Subnet mask prefix", enter the subnet mask that corresponds to the IP network (255.255.255.0).
- Enter the IP address of the DNS server in the "Preferred DNS server" field (192.168.10.1).
- Click "OK" to save the settings and on the FRITZ!Box, confirm that the procedure may be executed, if you are asked to do so.
- Restart FRITZ!Box A by unplugging the power cable from the outlet and plugging it in again after a few seconds.
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" tab. If the tab is not displayed, enable the Advanced View first.
- Click the "Add VPN Connection" button.
- Click "Connect your home network with another FRITZ!Box network (LAN-LAN linkup)" and then "Next".
- In the field "VPN password (pre-shared key)", enter the password required to establish the VPN connection (secret1234).
- If the field "Name of the VPN connection" is displayed, enter a unique name (FRITZ!Box branch) for the connection.
- Enter the MyFRITZ! address of FRITZ!Box A (pi80ewgfi72d2os42.myfritz.net) in the field "Web address of the remote site".
- Enter the IP network of FRITZ!Box A (192.168.21.0) used for the VPN tunnel 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 you want to maintain the VPN connection to FRITZ!Box A all the time, enable the option "Hold VPN connection permanently".
- If you also want to restrict the use of the VPN tunnel to certain LAN ports on FRITZ!Box B:
- Click "Advanced Settings for Network Traffic".
- Enable the option "VPN tunnel is available only at the selected LAN ports of the FRITZ!Box".
- Select the LAN ports for which the VPN tunnel should be available.
- In the "Network prefix" field, enter the IP network to be used by the LAN ports you selected (192.168.11.0).
- In the field "Subnet mask prefix", enter the subnet mask that corresponds to the IP network (255.255.255.0).
- Enter the IP address of the DNS server in the "Preferred DNS server" field. If you want to allow devices connected to the selected LAN ports to use the Internet, enter the local IP address of FRITZ!Box A (192.168.20.1).
- Click "OK" to save the settings and on the FRITZ!Box, confirm that the procedure may be executed, if you are asked to do so.
- If you enabled the option "VPN tunnel is available only at the selected LAN ports of the FRITZ!Box", restart FRITZ!Box B by unplugging the power cable from the electric outlet and plugging it in again after a few seconds.
4 Establishing a VPN connection
If you enabled the option "Hold VPN connection permanently" in the FRITZ!Boxes, the VPN connection will be maintained at all times.
If the option "Hold VPN connection permanently" is not enabled, the VPN connection is automatically established when the remote network is accessed and it is cleared again if it has been inactive for one hour.
Note:Active VPN connections are displayed in the FRITZ!Box user interface under "Overview" in the section "Connections".