Adding a backup Internet WAN on my OPNsense Router

Jeff Geerling Tools

Summary

Jeff Geerling describes how to configure a backup WAN on an OPNsense router using a secondary gateway, allowing manual failover without physically reconnecting cables.

<p><em>AKA &quot;Spectrum has gone down two weeks in a row and I'm sick of it&quot;.</em></p> <p>I've been borrowing a portable 5G gateway from my Dad for a few weeks, for testing... and two weeks in a row, I've used it as a backup Internet option, since my Spectrum Business cable Internet has gone down.</p> <figure class="insert-image"><img src="https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/spectrum-cable-modem-online-offline.jpg" alt="Spectrum Business Cable Modem offline" width="700" height="auto"> </figure> <p>And yes, I'd get AT&amp;T Fiber if I had the option, sadly they don't yet provide service at my studio. So I'm stuck with only one high speed wired provider. I may add on my own 5G backup Internet connection in the future, but we're getting off track.</p>
Original Article
View Cached Full Text

Cached at: 07/24/26, 05:01 PM

# Adding a backup Internet WAN on my OPNsense Router Source: [https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/](https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/) *AKA "Spectrum has gone down two weeks in a row and I'm sick of it"\.* I've been borrowing a portable 5G gateway from my Dad for a few weeks, for testing\.\.\. and two weeks in a row, I've used it as a backup Internet option, since my Spectrum Business cable Internet has gone down\. ![Spectrum Business Cable Modem offline](https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/spectrum-cable-modem-online-offline.jpg)And yes, I'd get AT&T Fiber if I had the option, sadly they don't yet provide service at my studio\. So I'm stuck with only one high speed wired provider\. I may add on my own 5G backup Internet connection in the future, but we're getting off track\. The first outage, I unplugged my Cable modem from my ETH1 port, and plugged in the 5G gateway\. I then rebooted the router, and also my main Mac \(it's DHCP and DNS caching seems very aggressive, at least for Safari's networking stack\)\. That*works*, but it's quite inconvenient, because I had to keep checking on Spectrum's Internet status, then when it was finally back up, I had to walk back and re\-plug my cable modem into my router, and reboot everything*again*\. Wouldn't it be easier if I could just\.\.\. do it in software? ## OPNsense and dual WAN ![OPNsense router WAN2 port on back](https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/opnsense-wan2-port.jpg)My plan was to plug the 5G gateway into 'ETH2' \(the third Ethernet port on my OPNsense box; ETH0 went to my LAN, ETH1 was for the Cable modem, and ETH2 and ETH3 are available—all are 2\.5 Gbps ports\)\. 'ETH2' was device 'igc2', so I logged into OPNsense, and under Interfaces \> Assignments, I assigned new interface 'igc2' named 'WAN2'\. ![OPNsense Interface igc2 assignment](https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/opnsense-1-igc2-assignment.png)Then I clicked on WAN2 in the sidebar, and changed the following settings: - Enable \(checked\) - IPv4 Configuration Type: DHCP Click 'Save', then 'Apply Changes' \(at the top\), then go to System \> Gateways \> Configuration, and make sure your new WAN2 gateway has appeared there\. \(Since I don't want automatic failover, I won't set up any specific rules / monitors here, but you can figure that out on your own if you want that\.\) Go to Firewall \> NAT \> Outbound and make sure you have 'Automatic outbound NAT' set up\. If it is not set up, you may need to add a rule for the WAN2 interface\. ## Failover ![OPNsense Interface Gateway configuration page](https://www.jeffgeerling.com/blog/2026/opnsense-backup-internet-gateway/opnsense-2-gateway-configuration.png)To actually failover to WAN2: 1. Visit System \> Gateways \> Configuration 2. Edit WAN2\_DHCP, and set the Priority to "1" \(and make sure it is not 'Disabled'\) 3. Edit WAN\_DHCP, and set the Priority to "2" 4. Click 'Apply' and wait a few seconds I usually use`curl icanhazip\.com`or visit[fast\.com](https://fast.com/)to determine which connection my computer's*actually*using at any given moment\. To switch back, set WAN2\_DHCP to "2" \(or more\), and WAN\_DHCP to "1" \(making sure it is not 'Disabled'\), and click 'Apply' again\.

Similar Articles

Building an OPNsense router

Lobsters Hottest

A detailed guide on building a custom OPNsense router for a home network, explaining the architecture of routers, VLAN configuration, and the decision to use OPNsense as an alternative to commercial gateway solutions.

HomeLab #1: MikroTik as a Home Router

Hacker News Top

A practical guide to setting up a MikroTik router for a home lab, covering how to identify ISP connection types (IPoE vs PPPoE) and WAN IPv4 addresses (public vs CGNAT/DS-Lite) to configure the router correctly.