AI Security
Defend the patient portal by behavior, because the IP blocklist already lost
One defender describes automated traffic spread across huge pools of residential IPs, a request or two each, that changes tactics within hours of being blocked. For a patient portal, that means defending on behavior, exposure, and identity, while protecting the real patients who look unusual.
November 20, 2026 · 6 min read

Blocking by IP address does little against traffic that never sends more than a request or two from any one address. A defender on Reddit's r/AskNetsec described exactly that after "a rough few weeks" protecting customer-facing web apps. The traffic came from "huge pools of residential and mobile IPs, each making only a request or two, so they look like normal customers." The people behind it read the public frontend code to work out the API, and their tactics changed "within hours of you blocking something."
The poster does not know whether AI is involved, and says so: "Whether there's an AI behind it or just good tooling, the effect is the same." The old playbook of rate-limiting by IP and blocklisting bad addresses, in their words, "barely moves the needle."
This is one person's account from one thread, and I am treating it that way. But it describes a pattern that maps closely onto a patient portal, and the defenses they found useful are worth walking through with a portal in mind. I am going to stay on the defending side of this and not describe how that kind of traffic is built.
Why a patient portal is a hard case
A patient portal has every property that makes IP-based defense weak. Patients log in from home internet, mobile networks, hospital guest Wi-Fi, and while traveling. Caregivers sign in for parents. Older patients mistype passwords several times. A CAPTCHA on every page would lock out the people who most need the portal and fail accessibility expectations.
The poster asked the same question at the end of their thread, about business portals: how do you handle this "where you can't put a CAPTCHA in front of everything?" For a patient portal, the answer has to be controls that tell real patients from automated traffic without making every patient prove it.
Defend on behavior, not on addresses
The first thing that worked for the poster was checking behavior instead of origin: "Checks that prove there's a real browser, and rules based on what the attacker is going after rather than where they come from, did far more than any blocklist."
For a portal, that translates to asking what a real session looks like and watching for sessions that do not fit. A real patient signs in, checks results or messages, maybe books an appointment, and leaves. A session that touches account recovery for many different accounts, or requests records in a pattern no patient would, is suspicious no matter which address it comes from.
Put the strongest checks on the actions that matter most: sign-in, account recovery, proxy access requests, record downloads, and changes to contact details. Those are the places where a stolen account turns into exposed health information.
Shrink what is exposed
The second lesson is the one I would start with, because it costs the least. The poster checked their logs for "what real users actually call, and the attackers were mostly poking at everything else." If an endpoint or method is not used, turn it off.
Portals accumulate old endpoints: a feature that was retired but never removed, a test path, an API version the mobile app stopped using two releases ago. Each one is something to defend. Pull a month of real traffic, list which endpoints real patients use, and ask the owner of every other endpoint why it is still reachable from the internet.
Change safely, and watch your own false positives
Two of the poster's lessons are about the defenders, not the attackers. They treat web application firewall and load balancer configuration as code, with every change going through review, a test run, staging, and then one site at a time. And they decided ahead of time who can make an emergency change by hand at 3 a.m., who they tell, and how that change gets back into the repository.
The second lesson is one healthcare teams should take to heart: "Some of our worst moments were our own hardening locking out legitimate users and partners." A portal lockout is not a minor inconvenience. A patient who cannot read a result or message a clinician calls the clinic, or goes without. Every control needs a quick way to tell an attack from "a customer who clicks fast," in the poster's phrase. In a portal, that might be a patient who fails to sign in three times and then asks for a reset.
Measure the false positives as closely as the blocks. If a new rule locks out more patients than it stops attacks, it is not a security win.
Identity beats location, and logs have to answer "did they get in?"
The poster's view is that "real users travel and work from home," so MFA and device or certificate-based access for partners age better than IP and country rules. For a portal, that means investing in patient MFA that patients will actually use and in strong verification at account recovery, a common path to account takeover.
Their last lesson is the one incident responders will recognize: "A 200 response doesn't mean success." Web server logs show requests. Application logs have to show outcomes: which account signed in, what it viewed, what it downloaded. If you cannot answer "did they get in, and what did they see?" from your logs, you cannot scope an incident or write an accurate notice.
A short review for your portal team
Get the portal owner, someone from security, and someone from patient support in a room for an hour. Ask five questions. Which endpoints do real patients use, and which are exposed but unused? Which actions get the strongest checks, and do recovery and proxy access count among them? How many patients did our controls lock out last month? Can we make an emergency rule change at night and still track it? And from our application logs, could we say which records a given session viewed?
The poster's closing line is the right frame: assume the other side "can read your client-side code, has more IPs than you'll ever block, and adapts faster than your change process." Your advantage is knowing what normal looks like for your patients. Write that down before you need it.