Two Problems, One Firewall: A TP-Link Extender Hijacked My Gateway and CrowdSec Banned My Own App

Tonight my home network had two problems that looked like one. First, connections to my OPNsense firewall kept dropping, and the only thing that brought them back was a reboot. Then, right after that reboot, an app that keeps a long-lived connection open to its servers stopped working on every device in the house, wired and Wi-Fi. On cellular it worked fine.
Neither problem turned out to be the firewall’s fault, exactly. One was a Wi-Fi extender. The other was CrowdSec doing its job a little too well. Here’s how I tracked both down, in case you run into either one.
The short version
- Problem 1: A TP-Link RE653BE Wi-Fi extender was answering ARP for
192.168.0.1, the firewall’s own LAN address. Devices sent their traffic to the extender instead of the firewall, and connections died. - Problem 2: Rebooting the firewall wiped its state table. The app’s servers kept sending packets on connections the firewall no longer knew about. CrowdSec saw those drops as a port scan and banned the servers, in both directions.
- Fixes: Unplug the extender (or put it in AP mode with a wired uplink), delete the false CrowdSec bans, and add the app’s servers to a CrowdSec allowlist.
Problem 1: something else claiming to be the gateway
The first clue was uptime. OPNsense had only been up a few minutes because I’d just rebooted it to get back in. So I went looking at what happened before the reboot, in System > Log Files > General.
It was full of two kinds of kernel messages. The first one is the one that matters:
arp: 98:03:8e:xx:xx:xx is using my IP address 192.168.0.1 on bridge0!
arp: 192.168.0.14 moved from 98:03:8e:xx:xx:xx to bc:24:11:xx:xx:xx on bridge0
The “using my IP address” line showed up 360 times in three hours. The same MAC also claimed hundreds of other LAN addresses, mostly my Proxmox containers (the bc:24:11 prefix is Proxmox’s). When a device asks “who has 192.168.0.1?” and the wrong box answers, that device sends its traffic to the wrong place. The web GUI, DNS and the internet all go with it.
The 98:03:8E prefix belongs to TP-Link. Looking up the full MAC in my DHCP leases pointed straight at the culprit: my TP-Link RE653BE Wi-Fi extender.
Why extenders do this
In extender (repeater) mode, these devices use MAC cloning, a form of proxy ARP. Every client connected through the extender shows up on your network with the extender’s MAC address. Some TP-Link extenders take it further and answer ARP for addresses that aren’t theirs, including the gateway. I’m not the only one who’s seen it: there are threads on TP-Link’s own community forum from people whose extenders were spoofing their router’s MAC.
I tried the usual fixes: a firmware update, a static IP on the extender, and EasyMesh mode. It still did it in EasyMesh, most likely because nothing on my network could act as the EasyMesh controller (my main Wi-Fi is a Deco, which uses its own mesh). With no controller, the extender just behaves like a plain repeater.
The fix
- Short term: unplug it. Nothing on the firewall can stop this. Bogus ARP replies go straight to your other devices at layer 2, and firewall rules never see them.
- Best fix: give it a wired uplink and switch it to Access Point mode. In AP mode it doesn’t clone MACs. If you can’t run a cable, powerline or MoCA adapters get you a wired uplink over the wiring you already have.
- Or replace it with a mesh node that uses proper wireless backhaul. If you already run Deco, add another Deco unit instead of an extender.
If you want to check your own network, look in the OPNsense general log for is using my IP address. You should never see that line for your firewall’s own LAN IP.
Problem 2: works on cellular, dead on Wi-Fi and wired
Right after the reboot, one app stopped working. It failed on every device on my network and worked fine on my phone’s cellular connection. That pattern rules out the app and the devices, and points at something they all share: the firewall.
The firewall log didn’t show anything obvious, and DNS was resolving fine. The state table is what gave it away. In Firewall > Diagnostics > States, searching for the app’s server addresses showed this:
tcp 192.168.0.28:51945 -> 203.0.113.10:443 CLOSED:SYN_SENT pkts 1,0
tcp 192.168.0.28:51946 -> 203.0.113.10:443 CLOSED:SYN_SENT pkts 1,0
tcp 192.168.0.28:51947 -> 203.0.113.10:443 CLOSED:SYN_SENT pkts 1,0
...
Over 200 connection attempts in two minutes, each one a single SYN that never got an answer. (I’ve swapped in documentation addresses here.) Even stranger, a couple of other machines still had old established connections to the same servers from before the problem started. Only new connections were failing.
My first guess was that the app’s provider was rate-limiting my public IP, so I changed my WAN MAC address in OPNsense to get a new IP from Verizon. That didn’t help, and it wasn’t the problem. The real clue was that the SYNs from the LAN never showed up as outbound states on the WAN side at all. They weren’t leaving the firewall.
CrowdSec banned them
I run the os-crowdsec plugin, which adds floating rules that block traffic to and from its blocklists, in both directions. In Services > CrowdSec > Decisions, there they were: the app’s servers, banned by my own CrowdSec agent with the reason firewallservices/pf-scan-multi_ports.
Here’s how a legitimate app server ends up looking like a port scanner:
- The app holds a long-lived connection to its servers.
- I reboot the firewall. Its state table is wiped, so it no longer knows about those connections.
- The servers keep sending data on the old connections. To the firewall, that’s unsolicited traffic hitting the WAN on a bunch of different ports, so it drops it.
- CrowdSec reads the firewall log, sees one IP getting dropped on many ports, and decides it’s a port scan.
- It bans the IP. The outbound CrowdSec rule then blocks every new connection from my LAN to that server.
That explains everything: every device on my network failed, cellular worked, and the old connections that were already open kept working until they closed.
The fix
First, remove the bans. You can delete them in Services > CrowdSec > Decisions, or from a shell:
cscli decisions list
cscli decisions delete --ip 203.0.113.10
The app reconnected within seconds. But it’ll happen again after the next reboot, so the servers need to be on an allowlist. The OPNsense plugin doesn’t have a page for that, so it’s a shell job (SSH in, or use option 8 on the console):
cscli allowlists create myapp -d "App servers - false pf-scan bans after reboot"
cscli allowlists add myapp 203.0.113.10 203.0.113.11 203.0.113.12
cscli allowlists inspect myapp
Allowlists take effect right away, no restart needed. On older CrowdSec versions without the allowlists command, drop a whitelist parser into /usr/local/etc/crowdsec/parsers/s02-enrich/ instead and restart CrowdSec:
name: crumpy/myapp-whitelist
description: "Don't ban my app's servers"
whitelist:
reason: "App backend"
ip:
- "203.0.113.10"
- "203.0.113.11"
- "203.0.113.12"
One caveat: if the servers are on AWS or another cloud, their addresses can change. If it breaks again after a reboot, check Decisions for new pf-scan-multi_ports bans and add those IPs too. If that gets old, you can disable the two CrowdSec … out floating rules. A false ban would then only block inbound traffic from that server, and your devices could still reach it.
What I’d check first next time
- Connections drop until you reboot the firewall? Search the general log for
is using my IP address. Something else may be claiming your gateway. - Something breaks right after a firewall reboot, and only on your network? Check CrowdSec Decisions for fresh
pf-scan-multi_portsbans before anything else. - Lots of
SYN_SENTstates with zero replies? Check whether there’s a matching state on the WAN side. If there isn’t, the packets aren’t leaving your firewall, and the problem is local.
Sources: CrowdSec AllowLists, CrowdSec whitelists, TP-Link Community: range extenders spoofing the router’s MAC, 98:03:8E MAC lookup.
1 comment