Article 002 - Adding a 4G Router as a Failover Internet Connection

pfSense: 4G LTE Backup WAN with Automatic Failover


Introduction

If your internet comes via DSL, fibre or similar, and you're worried about outages disrupting service, you can set up a reliable backup using a 4G LTE router as a secondary WAN connection for pfSense.

If your main connection fails, pfSense automatically switches to 4G within seconds, then restores the primary WAN once it's back online, all without any intervention.

This setup introduces no new or unusual security concerns. The 4G router simply sits in front of pfSense, just like your existing WAN, and all of pfSense's firewall and security features continue to apply exactly as before.

The goal: automatic failover when the main connection drops, and automatic recovery when it returns. This isn't an exhaustive guide, as some details depend on your existing pfSense configuration.

Note: all IP addresses, WAN names and other details in this article are fictional examples. No real internal or public IPs are included.

Hardware Overview

ItemDetails
pfSense firewallx86-64 or Netgate ARM hardware
Primary WANYour main internet connection, called WAN_MAIN here
Secondary WANThe 4G LTE router, called WAN_4G here
Existing LAN subnet192.168.1.0/24 (assumed)

The 4G router needs a mobile phone SIM card for data, and connects to pfSense via Ethernet.

Step 1 – Configure the 4G Router

  1. Insert a SIM card into the 4G router.
  2. Connect to the router directly with a Cat5 cable and open its default admin login page.
  3. Check the APN settings (usually detected automatically).
  4. Make sure the router has a static IP, e.g. 192.168.10.1.
  5. Disable Wi-Fi, as it isn't needed.
  6. Disable the DHCP server. pfSense will handle DHCP.
  7. Save and reboot the router.

Then connect the 4G router's LAN port to one of pfSense's spare ports. The 4G router's own WAN port isn't used.

Step 2 – Add the 4G Router's Interface in pfSense

  1. Log in to pfSense and go to Interfaces → Assignments.
  2. Add the new interface (e.g. igc3, depending on which port the 4G router is plugged into) and name it WAN_4G.
  3. Enable it and set IPv4 Configuration Type to DHCP.
  4. Save and apply changes.

pfSense should obtain an IP (usually 192.168.10.100) and a gateway (192.168.10.1, the 4G router's static IP).

Step 3 – Configure Gateways

  1. Go to System → Routing → Gateways. You should see two gateways: WAN_MAIN and WAN_4G.
  2. Edit each gateway and set the thresholds below.
  3. Save and apply changes.
SettingWAN_MAINWAN_4G
Latency thresholdsLow 250 ms / High 600 msLow 250 ms / High 600 ms
Packet loss thresholdsLow 20% / High 50%Low 20% / High 50%
Monitor IP8.8.8.88.8.4.4

Step 4 – Create a Gateway Group for Failover

  1. Go to System → Routing → Gateway Groups.
  2. Add a group named WAN_GROUP with the settings below.
  3. Save and apply.
SettingValue
WAN_MAINTier 1
WAN_4GTier 2
Trigger LevelMember Down, Packet Loss or High Latency. You may need to experiment with this setting.
DescriptionWAN Failover

Then go to System → Routing → Default Gateway and set Default Gateway IPv4 to WAN_GROUP (WAN Failover).

pfSense will now use the primary WAN_MAIN automatically, and switch to WAN_4G if it fails.

Step 5 – Firewall Rules

Under Firewall → Rules, add:

InterfaceActionSourceDestinationDescription
LAN Pass A specific trusted IP address any Allow access to 4G router management

This lets one specific trusted device reach the 4G router's web interface. You'll need it if your 4G router is on a different subnet from your LAN.

Step 6 – Testing Failover

  1. Disconnect the main WAN connection and open Status → Gateways.
  2. WAN_MAIN shows Offline, and WAN_4G becomes Active.
  3. pfSense automatically reroutes traffic via 4G.
  4. When WAN_MAIN comes back, it returns as the primary route.
  5. If you've added both gateways to the pfSense dashboard, you'll see the status of each, and the globe symbol shows which one is currently active.

Step 7 – (Optional) Email Notifications

pfSense can send notifications when gateways change state. Go to Status → System Logs → Settings → E-Mail, enter your SMTP details and enable Gateway monitoring events.

Step 8 – Final Notes

  • Disable remote management on the 4G router.
  • Change the 4G router's admin password.
  • In pfSense, the globe icon beside a gateway shows the currently active WAN.
  • Back up the new pfSense and 4G router configurations.
  • If you use DDNS or external monitoring, remember that failover temporarily changes your public IP.

Results

  • Automatic 4G failover when the main connection drops.
  • Automatic recovery when it returns.
  • Seamless internet continuity during outages.
This gives pfSense full dual-WAN redundancy with simple hardware and no extra software: a reliable, practical backup for home or small office.

Extra: Notification Emails

Screenshots of the notification emails I received on a disconnect and the reconnect that followed. This was most likely caused by a poorly placed 4G antenna giving low signal quality and strength.

Disconnect:

Gateway disconnect notification email

Reconnect:

Gateway reconnect notification email

 

↑ Top