Knowledge Base
AVM Content
- FRITZ!Box 7690
- FRITZ!Box 7682
- FRITZ!Box 7590 AX
- FRITZ!Box 7590
- FRITZ!Box 7583 VDSL
- FRITZ!Box 7583
- FRITZ!Box 7582
- FRITZ!Box 7560
- FRITZ!Box 7530 AX
- FRITZ!Box 7530
- FRITZ!Box 7520
- FRITZ!Box 7510
- FRITZ!Box 7490
- FRITZ!Box 7430
- FRITZ!Box 7390
- FRITZ!Box 7360
- FRITZ!Box 6890 LTE
- FRITZ!Box 6850 5G
- FRITZ!Box 6850 LTE
- FRITZ!Box 6840 LTE
Setting up a VPN to the FRITZ!Box in Linux
The vpnc plugin for the GNOME NetworkManager allows you to establish a secure VPN (Virtual Private Network) connection from your Linux computer to your FRITZ!Box over the internet. This allows you to access your FRITZ!Box and devices in your home network with your computer even when you are away from home.
The vpnc plugin is available free of charge for Debian, Fedora, Ubuntu, and other Linux distributions.
Example values used in this guide
In this guide we show you how to connect a computer with Ubuntu 22.04 LTS to the FRITZ!Box. When setting up the connection, replace the values used in this example with your actual values.
- MyFRITZ! address of the FRITZ!Box:
pi80ewgfi72d2os42.myfritz.net - Username of the FRITZ!Box user:
John Smith - Password for the FRITZ!Box user:
secret1234 - Shared secret of the FRITZ!Box user:
Zj7hPCouK65IrPU4
Requirements / Restrictions
- The packages vpnc, network-manager-vpnc, and network-manager-vpnc-gnome are installed on the computer.
Note:You can install the packages in Ubuntu as follows:
sudo apt-get install network-manager-vpnc-gnome
- The FRITZ!Box must obtain a public IPv4 address from the internet service provider.
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!Box with MyFRITZ!Net so that it can always be reached on the internet at a fixed MyFRITZ! address:
- Click "Internet" in the FRITZ!Box user interface.
- Click on "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.
Adjusting the FRITZ!Box's IP network
Both ends of a VPN connection must have IP addresses in different IP networks. As soon as the computer is connected to a router (for example another FRITZ!Box) that uses the same IP network as your FRITZ!Box, VPN communication is no longer possible.
Note:All FRITZ!Boxes use the IP network 192.168.178.0 in the factory settings.
Set up an IP address in your FRITZ!Box that differs from the IP addresses of the routers you use to connect to the FRITZ!Box, for example 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 the "IPv4 Addresses" button. If the button is not displayed, enable the Advanced View first.
- Enter the desired IP address and subnet mask.
- 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 Setting up a VPN connection in the FRITZ!Box
Set up a separate user for each VPN connection in the FRITZ!Box:
- Click "System" in the FRITZ!Box user interface.
- Click "FRITZ!Box Users" in the "System" menu.
- Click the (Edit) button for the user who intends to connect to the FRITZ!Box via VPN or set up a new user for the VPN connection:
- Click the "Add User" button.
- Enter a name and password for the user in the corresponding fields.
- Enable the option "VPN".
- 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.
- Now the FRITZ!Box sets up the VPN connection for the user and opens a window with the VPN settings of the user.
Note:You can always call up the VPN settings again by clicking "Show VPN Settings" in the settings for the user under "System > FRITZ!Box Users".
3 Setting up and establishing a VPN connection on the computer
Set up the VPN connection on the computer using the VPN settings displayed in the FRITZ!Box user interface for the FRITZ!Box user:
- Start the Advanced Network Configuration, for example in the terminal by entering "nm-connection-editor".
- Click on the plus sign in the "VPN" section. The "Add VPN" window opens.
- In the "Add VPN" window, select "Cisco Compatible VPN (vpnc)".
- Enter a name of your choice (FRITZ!Box-VPN) in the "Connection name" field.
- Enter the MyFRITZ! address of the FRITZ!Box (pi80ewgfi72d2os42.myfritz.net) in the "Gateway" field.
- Enter the username of the FRITZ!Box user (John Smith) in the field "Username".
- Click the symbol in the field "User password", select "Store the password only for this user", and enter the password for the FRITZ!Box user (secret1234).
Note:With some Ubuntu versions, you must enable the option "Store the password for all users" instead.
- Enter the username of the FRITZ!Box user (John Smith) in the "Group name" field.
- Click the symbol in the field "Group password", select "Store the password only for this user", and enter the "shared secret" for the FRITZ!Box user (Zj7hPCouK65IrPU4). The "shared secret" is displayed in the VPN settings of the user in the section "iPhone, iPad or iPod touch".
- Click "Advanced".
- Enter tun0 in the field "Tunnel interface name" and click "Apply".
- Click the "Save" button to complete the configuration. If the button "Save" is grayed out, click "Advanced" again and then "Apply", and save again.
- Click the on/off slider for the VPN connection to establish the connection.