Gridy Block
Gridy Block restricts who can request access to your Gridy protected assets & where those requests originate.
Block Users, IPv4 address ranges, entire Country IPv4 address ranges, Proxies, ToR Exit nodes and more.
In order to get started using the Gridy Block API Service:
- Sign up for a paid Gridy API subscription here
- Use the CLI to Enable & Create Block Rules on your account
- Use the example code & drop-in to your website/application or write your own using one our API client libraries in your preferred programming language.
- Send your first Gridy Block API request
Note: Rules & Block lists are not available to Free service accounts.
Gridy Block rules are managed using the CLI tool, see usage examples below:
Settings
Enable Blocked Rules
Enable IPv4, GeoIPv4 & User Blocked rules
java -jar gridy-admin-cli.jar rules update --data '{ "rules-enable": true }'
View Blocked Rules
View all Blocked rules created
java -jar gridy-admin-cli.jar rules view
Block IPv4 Range
Block all requests from an IPv4 Range ( default: None )
IPv4 Range rules uses CIDR notation, see the wikipedia page below for more help:
CIDR notation help: https://en.m.wikipedia.org/Classless_Inter-Domain_Routing
Examples
19.151.100.14/32 - represents a single IPv4 address: 198.51.100.14
71.51.100.0/22 - represents 1024 IP addresses: 71.51.100.0 - 71.51.103.255
java -jar gridy-admin-cli.jar rules <add|remove> --data '{"block-iprange":"['198.51.100.14/32','71.51.100.0/22']"}'
Block IPv4 Address
Block all requests from a single IPv4 address ( default: None )
java -jar gridy-admin-cli.jar rules <add|remove> --data '{"block-ipaddress":"['198.51.100.14']"}'
Block Country IPv4 Range
Block all requests from an allocated Country IPv4 Range ( default: None )
ISO 3166 Two-letter Country codes: https://en.m.wikipedia.org/wiki/ISO_3166-1_alpha-2
Example Rules
['AF'] - Block all allocated Afghanistan IPv4 ranges
['AF','AO', 'SO'] - Block all allocated Afghanistan, Angolan, Seychelles IPv4 ranges
['ALL!US'] - Block all but allocated US IPv4 ranges
['ALL!US!EU'] - Block all but US, EU allocated IPv4 ranges
java -jar gridy-admin-cli.jar rules <add|remove> --data '{"block-country":"[ 'IR','KP' ]" }'
Block Users
Block all requests from a specific user ( default: None )
java -jar gridy-admin-cli.jar rules <add|remove> --data '{"block-user":"['user@domain.tld','user@domain1.tld']"}'
Block TOR Exit Nodes
Block all requests from known Dark Web Tor Exit node IPv4 addresses ( default: false )
java -jar gridy-admin-cli.jar rules update --data '{"block-tor-node": true }'
Block Anonymous Proxies
Block all requests from known Anonymous Proxy IPv4 addresses ( default: false )
java -jar gridy-admin-cli.jar rules update --data '{"block-proxy-anonymous": true }'
Block Public Proxies
Block all requests from known Public Proxy IPv4 addresses ( default: false )
java -jar gridy-admin-cli.jar rules update --data '{"block-proxy-public": true }'
Block Hosting Providers
Block all requests from known Hosting Provider IPv4 addresses ( default: false )
java -jar gridy-admin-cli.jar rules update --data '{"block-hosting-provider": true }'
Blocked Rules Mode
Update Blocked Rules mode (default: manual )
Modes
- Manual - Blocked rules updated manually using the CLI
- Adaptive - Blocked rules adjusted based on detected current threats.
Note: Adaptive mode is experimental and not available to Free service accounts.
Status
Available in Q3 2025
java -jar gridy-admin-cli.jar rules update --data '{ "rules-mode": adaptive }'
Blocked Rules No-Code API client
Copy & Paste the code below into any website page & redirect unwanted traffic that fails your blocked rules checks.
Status
Available in Q3 2025
<script charset= "UTF-8" src="https://cdn.gridy.io/js/gridy-blocked.min.js" />
<body>
<!-- Your Webpage Source Above -->
<script>
const gridyclient = new GridyBlocked( "Your Gridy Blocked Rules API Key", {
language: 'language_code',
redirect_url: "your_redirect_url",
})
gridyclient.checkrules().then(response => console.log(response));
</script>
</body>