FRITZ!Box 4020 Serwis - Baza wiedzy

FRITZ!Box 4020 Serwis

Setting up a VPN connection to FRITZ!Box in Linux

The vpnc plugin for the GNOME NetworkManager allows you to establish a secure VPN (Virtual Private Network) connection over the internet from a Linux computer to your FRITZ!Box and then access all of the devices and services in the home network of your FRITZ!Box.

The vpnc plugin is 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 18.04 LTS to the FRITZ!Box. When setting up your connection, replace the values used in this example with actual ones.

  • MyFRITZ! domain name of the FRITZ!Box:
    pi80ewgfi72d2os42.myfritz.net
  • User name of the FRITZ!Box user:
    John Smith
  • Password of the FRITZ!Box user:
    secret
  • 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 establish its own connection to the internet using a modem (for example a DSL or cable modem).
  • 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!

With MyFRITZ! you can even access the FRITZ!Box over the internet at all times if the FRITZ!Box receives a different public IP address from your internet service provider on a regular basis:

Note:If you already use a different dynamic DNS service, you can also use this service instead of MyFRITZ!.

Adjusting the FRITZ!Box's IP network

Both ends of a VPN connection must have IP addresses in different IP networks. VPN communication cannot occur if your computer is connected to a router (for example another FRITZ!Box) that uses the same IP network as your FRITZ!Box.

Note:All FRITZ!Boxes use the IP network 192.168.178.0 in the factory settings.

Assign an IP address to your FRITZ!Box that differs from the IP addresses of the routers you will use to connect to the FRITZ!Box, for example 192.168.10.1 (subnet mask 255.255.255.0):

  1. Click "Home Network" in the FRITZ!Box user interface.
  2. Click "Network" in the "Home Network" menu.
  3. Click on the "Network Settings" tab.
  4. Click the "IPv4 Addresses" button.
  5. Enter the desired IP address and subnet mask.
  6. Click "OK" to save the settings and confirm that the procedure may be executed on the FRITZ!Box, if asked to do so.

2 Setting up a VPN connection in the FRITZ!Box

Set up a different user for each VPN connection in the FRITZ!Box:

  1. Click "System" in the FRITZ!Box user interface.
  2. Click "FRITZ!Box Users" in the "System" menu.
  3. Click the (Edit) button for the user who intends to connect to the FRITZ!Box via VPN. If you have not set up any users yet:
    1. Click the "Add User" button.
    2. Enter a name and password for the user in the corresponding fields.
  4. Enable the option "VPN".
  5. Click "OK" to save the settings and confirm that the procedure may be executed on the FRITZ!Box, if asked to do so.

Now the FRITZ!Box sets up the VPN rights for this FRITZ!Box user.
A window displaying the VPN settings for the FRITZ!Box user then opens automatically.

Note:You can open this window any time by clicking "Show VPN Settings" in the settings for the FRITZ!Box user.

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:

Note:You can access the VPN settings if you select "System > FRITZ!Box Users" in the user interface, call up the settings for the user, and click "Show VPN Settings".

  1. Call up the "Settings" menu.
  2. Click "Network" in the "Settings" menu.
  3. Click the plus sign in the "VPN" section. The "Add VPN" window opens.
  4. In the "Add VPN" window, select the entry "Cisco Compatible VPN (vpnc).
  5. Enter a name of your choice (FRITZ!Box-VPN) in the "Connection name" field.
  6. Enter the MyFRITZ! domain name of the FRITZ!Box (pi80ewgfi72d2os42.myfritz.net) in the "Gateway" field.
  7. Enter the user name of the FRITZ!Box user (John Smith) in the field "Username".
  8. Click the symbol in the field "User password", select the entry "Store the password only for this user", and enter the password for the FRITZ!Box user (secret).
  9. Enter the user name of the FRITZ!Box user (John Smith) in the "Group name" field.
  10. Click the symbol in the field "Group password", select the entry "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".
  11. Click the "Add" button to complete the configuration.
  12. Click the on/off slider for the VPN connection to establish the connection.