Skip to content
VercelLogotypeVercelLogotype
LoginSign Up

Block OFAC-Sanctioned Countries Firewall Rule

Use this template to quickly implement blocks against traffic from OFAC-sanctioned countries with the Vercel Web Application Firewall (WAF).

DeployView Demo

Block OFAC-Sanctioned Countries and Regions

This template provides a preset, customizable Vercel Firewall rule which is designed to support your compliance with US export control regulations by offering the ability to restrict access from sanctioned and embargoed regions.

Overview

Identify incoming requests based on their country of origin and block access from specified OFAC-sanctioned countries and regions. The list is not meant to be exhaustive, and may not include all sanctioned countries and regions as of any given date. Updating and customizing the list of countries and regions, ensuring that the firewall rule is operating as intended, and otherwise maintaining the compliance of your product and operations remains your responsibility.

Consider customization

The generated Firewall rule provides a basic structure for blocking traffic from countries and regions sanctioned by the Office of Foreign Assets Control (OFAC). Consider customizing the following parameters to suit your specific compliance needs:

  1. Country List: Update the list of countries to be blocked based on the latest government sanctions program or any countries you desire to add.
  2. Region List: Use the Country and State keys together to block specific regions or subdivisions in ISO 3166-2 format (e.g., UA-43 for Crimea). This allows for more granular control than country-level blocking. Note: Country and State correspond to the X-Vercel-IP-Country and X-Vercel-IP-Country-Region headers, respectively.
  3. Exception Handling: Configure exceptions for specific IP addresses or entities that require access despite country restrictions.

Persistent Action

The rule includes a persistent action set to a duration of 1 hour. Any requests blocked due to persistent actions, which are activated after the first violation of the rule, are blocked before any usage is incurred.

Availability

This solution can be implemented by users on all plans.

To Use

To use this template, follow these steps:

  1. Click "Add Firewall Rule."
  2. Select your team and project.
  3. Configure the rule to block traffic from countries and regions sanctioned by the Office of Foreign Assets Control (OFAC) as necessary.
  4. Don't forget to hit "Save," and then "Publish" to activate the rule.
GitHub
Ownervercel
Repositoryfirewall-templates
Use Cases
Vercel Firewall
Stack
Other
None

Related Templates

Rate Limit API Requests Firewall Rule

Adds a rule to your Vercel Firewall that rate limits API requests.
Rate Limit API Requests Firewall Rule thumbnail

Block WordPress URLs Firewall Rule

Adds a rule to your Vercel Firewall that blocks common WordPress-related URLs.
Block WordPress URLs Firewall Rule thumbnail

Block Bad Bots Firewall Rule

Adds a rule to your Vercel Firewall that identifies bots that you might not want requesting your projects.
Block Bad Bots Firewall Rule thumbnail

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • EveNew
  • ConnectNew

Core Platform

  • CI/CD
  • Content Delivery
  • Fluid Compute
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • Bot ID

Tools

  • Vercel DropNew
  • Vercel Agent
  • Vercel PluginNew
  • Next.js
  • Domains
  • v0

Frameworks

  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • xmcp
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDKNew
  • Queues SDKNew
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal (all documents)
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram
  • VercelVercel
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Eve
Core Platform
  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains
  • v0
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community
EnterprisePricing
Contact
Log InSign Up
Dashboard

Products

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Eve

Core Platform

  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD

Tools

  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains
  • v0
Resources

Learn

  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce

Explore

  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community
Enterprise
Pricing
Sign UpLog In
Contact
Add Firewall RuleVercel WAF Docs

Loading status…

Select a display theme: