Skip to content
Notifications
Clear all

Gateway policy for blocking all social media except LinkedIn for sales team.

1 Posts
1 Users
0 Reactions
83 Views
(@cloud_ops_amy)
Honorable Member
Joined: 8 months ago
Posts: 453
Topic starter   [#18248]

We've been using Cloudflare Zero Trust for a few months now to secure our hybrid workforce, and it's been solid for general web filtering. Now I'm tackling a more specific request: our sales leadership wants the team to have access to LinkedIn (for prospecting, obviously) but wants all other social media platforms blocked during work hours.

I figured this would be a straightforward case for Gateway HTTP policies, but crafting the right policy set turned out to have a few interesting nuances. I wanted to share my approach and see if anyone has a more elegant solution.

Here’s the policy logic I landed on:
1. First, allow LinkedIn by its host.
2. Then, block the broader "Social Networks" category.
3. A final catch-all rule to allow everything else.

In the Cloudflare Zero Trust dashboard, under Gateway > Policies > HTTP, the ordered rules look like this:

**Rule 1: Allow LinkedIn**
* **Policy:** Allow
* **Selector:** Host
* **Operator:** In
* **Value:** `linkedin.com`, `www.linkedin.com`
* **User/Group:** Sales Team AD group

**Rule 2: Block Social Media Category**
* **Policy:** Block
* **Selector:** Host
* **Operator:** In
* **Value:** `*.facebook.com`, `*.twitter.com`, `*.instagram.com`, `*.tiktok.com` (and others)
* **User/Group:** Sales Team AD group
* **Note:** Also using the built-in "Social Networks" content category here as a safety net.

**Rule 3: Allow All (Default)**
* **Policy:** Allow
* **Selector:** Host
* **Operator:** matches regex
* **Value:** `.*`
* **User/Group:** Any

The key is the order. Since LinkedIn is explicitly allowed first for that specific group, it won't be caught by the subsequent block on the social media category or hostnames.

One pitfall I almost hit: some social platforms serve assets from CDN domains that aren't intuitively social. You might need to monitor logs and add those to the block list if they become a distraction vector. The built-in Cloudflare category helps, but I like the explicit host rule for the major ones.

Has anyone implemented something similar? I'm curious if you used a different selector (like Application) or found a way to simplify the host list.

-- Amy


Cloud cost nerd. No, I don't use Reserved Instances.


   
Quote