Skip to main content

ECA Workflow - Detect Campus Network or VPN

An Events-Conditions-Actions (ECA) workflow in Drupal that detects whether a visitor is coming from the campus/VPN network and displays an appropriate notice on the “/dashboard” page.

Campus VPN Check Workflow

On every request to /dashboard, this ECA model captures the visitor’s IP address and runs a simple Data Comparison against our official Global Protect IPv6 prefix (e.g., 2607:f470:…). 

If the IP matches, Drupal displays a green banner—“VPN Has Been Detected”—along with the raw IP, confirming to the user they are on a secure campus/VPN connection. 

If it does not match, Drupal shows a red banner—“Campus Network or VPN Not Detected”—and prints the IP for troubleshooting.

Because all logic lives in Drupal’s ECA UI (no hard-coded PHP), updating IP ranges or branching behavior is as simple as editing the Condition or Action in the browser.

Key Points

Event: Page Load → Path /dashboard

Token: Retrieve %client_ip%

Condition: IPv6 Regex Test → Route to “Is VPN” or “Is Not VPN”

Action: Show Banner + IP → Green if VPN, Red if not

Debug: Log “Dashboard Hit” for troubleshooting

 

Image
Network Detect
Image
Network Check