Emergency Internet Setup: Sharing Smartphone Hotspot to LAN via Linux & FRITZ!Box 7530
This guide documents the procedure for restoring internet connectivity to a home network (LAN) by routing traffic from a mobile phone hotspot, through a Linux server (running KDE / NetworkManager), and into a FRITZ!Box 7530.
1. Prerequisites & Architecture
- Source Internet: Android/iOS Mobile Hotspot.
- Gateway/Bridge: Linux Server with Wi-Fi (
wlp37s0) and Ethernet (enp39s0). - Router: FRITZ!Box 7530 (connected via LAN 2 to the Linux server).
- Network Flow:
Mobile Hotspot$\rightarrow$ (Wi-Fi) $\rightarrow$Linux Server$\rightarrow$ (Ethernet/NAT) $\rightarrow$FRITZ!Box LAN 2$\rightarrow$Home Network (WLAN/LAN)
2. Linux Server Configuration (NetworkManager CLI)
Step 2.1: Connect to Smartphone Hotspot
Connect your Linux Wi-Fi interface to your mobile hotspot via KDE GUI or nmcli:
8.8.8.8 may fail if your mobile carrier blocks raw ICMP packets; hostname lookup tests like google.com confirm full functional connectivity).
Step 2.2: Create Dedicated Ethernet Sharing Profile
Create a distinct NetworkManager profile for your Ethernet interface (enp39s0) that provides DHCP and NAT routing to downstream devices without interfering with your server's home settings.
nmcli connection add type ethernet ifname enp39s0 con-name "FRITZ-Share" ipv4.method shared ipv6.method ignore
Step 2.3: Prevent Default Gateway Hijacking
By default, turning on a shared IPv4 method might cause NetworkManager to set the Ethernet port as the system's primary gateway, breaking internet access on the Linux server itself. Prevent this by setting ipv4.never-default:
Step 2.4: Activate the Profile
Deactivate any existing local ethernet profile and activate the new sharing profile:
Verification:
1. Run ip addr show enp39s0 and ensure it holds a shared subnet IP (e.g., 10.42.0.1).
2. Run ip route and verify the default via route points to your Wi-Fi interface (wlp37s0).
3. Run ping -c 3 google.com to confirm internet connectivity remains active on the server.
3. FRITZ!Box 7530 Configuration
- Plug an Ethernet cable from the Linux server (
enp39s0) into LAN 2 on the back of the FRITZ!Box 7530. - Log into the FRITZ!Box Web UI (
http://fritz.box). - Navigate to Internet > Account Information.
- Set the following options:
- Internet service provider: Select Other internet service provider.
- Name: (Optional) enter
Linux WAN Bridge. - Connected via: Select External modem or router.
- Operating Mode: Select Internet connection via LAN 2.
- Account Information: Select No.
- WAN Settings: Select Obtain IP address automatically (DHCP).
- Click Apply.
4. Verification & Testing
- FRITZ!Box Overview: The dashboard should now show an active internet connection via LAN 2, holding an IP assigned by the Linux DHCP server (
10.42.x.xrange). - Client Devices: Any wired device plugged into other FRITZ!Box ports (LAN 1, LAN 3, LAN 4) or connected to FRITZ!Box Wi-Fi will now seamlessly browse the internet.
5. Reverting Back to Standard ISP Operation
When your primary ISP internet service is restored:
- On the Linux Server:
- On the FRITZ!Box 7530: Go to Internet > Account Information and select your original Internet Service Provider (e.g., DSL/Fiber settings) and save changes.
6. Permissions
Create a file /etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules with content below.