CDB WAAP protects your web application by blocking traffic from well-known malicious IP addresses.
We constantly collect, update, and validate these IP addresses, adding malicious IPs to the blocklist. This allows you to block, challenge, or allow traffic from highly suspected entities.
ℹ️
Info
This policy group is available in the Pro and Enterprise plans. More details on the Security pricing page.
2. In the domain dropdown at the top of the page, select the needed domain.
3. Click the IP Reputation tab to view and adjust the rules.
ℹ️
Info
Most IP reputation policies are enabled by default, except for Traffic via TOR network. To change a policy mode, click the dropdown near that policy.
Traffic via TOR network
TOR nodes are commonly used for web anonymity, but can also be used by hackers, scrapers, and spammers to crawl and hack web applications.
Enabling this policy will block traffic from IP addresses associated with the TOR network.
Traffic via proxy networks
Proxy networks are commonly used for web anonymity, but can also be used by hackers, scrapers, and spammers to crawl and hack web applications.
Use JavaScript validation to verify traffic from known proxy networks. This provides enhanced visibility and security against potential risks associated with proxy usage within web applications.
Traffic from hosting services
Organic human traffic is unlikely to come from IP spaces belonging to hosting providers. Instead, this traffic typically comes from infected servers controlled by hackers.
Use JavaScript validation to verify traffic from hosting services and commercial cloud providers. This enhances your application security by mitigating potential risks associated with such services within web applications.
Traffic via VPNs
Virtual Private Networks (VPNs) are commonly used for web anonymity, but can also be used by hackers, scrapers, and spammers to crawl and hack web applications.
Validate traffic originating from VPNs using JavaScript. This provides increased visibility and security against potential risks associated with VPN usage within web applications.
Bot traffic
Use JavaScript validation to verify traffic coming from IP addresses associated with malicious automated agents (bots).
Traffic from suspicious NAT ranges
Validate traffic coming from high-risk NAT ranges using JavaScript. These ranges are calculated based on historical web behavior detected by a machine learning classifier.
External reputation block list
The IPs on this list are known to be malicious or spam. When an IP with a negative reputation is detected, validate the incoming traffic using JavaScript.
Traffic via CDNs
Organic human traffic is unlikely to originate from IP spaces belonging to CDN companies. When such traffic is detected, validate it using JavaScript.
The Policies endpoints manage IP Reputation rules — filtering traffic based on source IP reputation across categories including TOR exit nodes, proxies, VPNs, hosting services, CDNs, bots, suspicious NAT ranges, and external blocklists. Most policies are enabled by default; Traffic via TOR network is disabled. Response examples include only the fields used in each step.
ℹ️
An API token is required, along with the ID of a WAAP-protected domain and the Python or Go SDK installed for SDK examples. This policy group is available on the Pro and Enterprise WAAP plans.
Retrieve the current mode of all IP Reputation policies for a domain.
import gcore
import os
client = gcore.CDB(api_key=os.environ["GCORE_API_KEY"])
domain_id = int(os.environ["WAAP_DOMAIN_ID"])
rule_sets = client.waap.domains.list_rule_sets(domain_id)
ip_rep = next(
rs for rs in rule_sets if rs.resource_slug == "ip-reputation"
)
for policy in ip_rep.rules:
status = "enabled" if policy.mode else "disabled"
print(f"{policy.name}: {status} ({policy.id})")
package main
import (
"context"
"fmt"
"os"
"strconv"
gcore "github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/waap"
)
func main() {
client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))
domainID, _ := strconv.ParseInt(os.Getenv("WAAP_DOMAIN_ID"), 10, 64)
ruleSets, _ := client.Waap.Domains.ListRuleSets(context.Background(), domainID)
for _, rs := range *ruleSets {
if rs.ResourceSlug == "ip-reputation" {
for _, policy := range rs.Rules {
status := "disabled"
if policy.Mode {
status = "enabled"
}
fmt.Printf("%s: %s (%s)\n", policy.Name, status, policy.ID)
}
}
}
}
The response includes each policy in the group with its ID and current state. mode: true means enabled; mode: false means disabled.
Toggle a policy
Switch a policy between enabled and disabled. Each call flips the current mode. Use the policy ID returned by the View policy states request.
import gcore
import os
client = gcore.CDB(api_key=os.environ["GCORE_API_KEY"])
domain_id = int(os.environ["WAAP_DOMAIN_ID"])
# Find the policy ID by name
rule_sets = client.waap.domains.list_rule_sets(domain_id)
ip_rep = next(
rs for rs in rule_sets if rs.resource_slug == "ip-reputation"
)
policy = next(r for r in ip_rep.rules if r.name == "Traffic via TOR network")
result = client.waap.domains.policies.toggle(policy.id, domain_id=domain_id)
status = "enabled" if result.mode else "disabled"
print(f"Traffic via TOR network is now {status}")
package main
import (
"context"
"fmt"
"os"
"strconv"
gcore "github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/waap"
)
func main() {
client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))
domainID, _ := strconv.ParseInt(os.Getenv("WAAP_DOMAIN_ID"), 10, 64)
// Find the policy ID by name
ruleSets, _ := client.Waap.Domains.ListRuleSets(context.Background(), domainID)
var policyID string
for _, rs := range *ruleSets {
if rs.ResourceSlug == "ip-reputation" {
for _, p := range rs.Rules {
if p.Name == "Traffic via TOR network" {
policyID = p.ID
}
}
}
}
result, _ := client.Waap.Domains.Policies.Toggle(context.Background(), policyID, waap.DomainPolicyToggleParams{DomainID: domainID})
status := "disabled"
if result.Mode {
status = "enabled"
}
fmt.Printf("Traffic via TOR network is now %s\n", status)
}
# Set POLICY_ID to the policy ID from the View policy states response
export POLICY_ID="{POLICY_ID}"
curl -X PATCH "https://api.cdb-staging.cdn.orange.com/waap/v1/domains/${WAAP_DOMAIN_ID}/policies/${POLICY_ID}/toggle" \
-H "Authorization: APIKey ${GCORE_API_KEY}"
Response:
{"mode": true}
The API returns the updated policy object. mode: true confirms the policy is now enabled; mode: false confirms disabled.