Securedns Hostcheck
The SecureDNS Host Check
hostnamesAPIagainstprovidesSecureDNSreal-time hostname filtering for parental controlserviceand content filtering systems. This endpoint allows you todeterminequeryaccesswhetherpermissions.a specific hostname should be allowed, refused, or ignored based on your configured SecureDNS rules and policies.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The SecureDNS Host Check API is designed for implementing real-time content filtering and parental control systems. This API category contains a single but powerful endpoint that evaluates hostnames against your configured SecureDNS policies and returns filtering decisions.
Key Features:
Common Integration Scenarios:
The endpoint is optimized for high-frequency queries and can be integrated into DNS resolution workflows, proxy servers, or any application requiring real-time hostname filtering decisions.
Endpoints
GET /securedns_hostcheck/
CheckDescription: if access toEvaluates a specific hostname shouldagainst be allowed, refused, or ignored based onyour SecureDNS parental control rules.policies Alland requestsreturns area loggedfiltering decision. This endpoint logs each request for monitoringaudit purposes and compliancereturns purposes.one of three possible actions: Allow (A) for permitted content, Refuse (R) for blocked content, or Ignore (I) for uncategorized content that should use default policies.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/securedns_hostcheck/?hostname=example.com&client_ip=192.168.1.100
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| hostname | string | query | Yes | The |
| client_ip | string | query | No | Client IP address for logging |
| string | query | No |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/securedns_hostcheck/?hostname=example.social-media-site.com&client_ip=192.168.1.10050" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response (Allowed):
{
"hostname": "example.educational-site.com",
"action": "A",
"category": "education",
"rule_id": "safe_browsing_001",
"category": "general"edu_allow_001",
"timestamp": "2024-01-15T10:30:00Z",
"client_ip": "192.168.1.100"
}
Example Response (Blocked)Refused):
{
"hostname": "blocked-site.com",
"action": "R",
"rule_id": "parental_control_018",
"category": "adult_content",
"rule_id": "adult_block_001",
"reason": "ContentParental blockedcontrol bypolicy parentalviolation",
controls""timestamp": "2024-01-15T10:30:00Z",
"client_ip": "192.168.1.100"
}
Example Response (Ignored):
{
"hostname": "unknown-site.com",
"action": "I",
"category": "uncategorized",
"timestamp": "2024-01-15T10:30:00Z",
"client_ip": "192.168.1.100"
}
Response Fields:Codes:
| Status | Description |
|---|---|
| 200 | Success - Rule matched and request allowed |
| 401 | |
| 403 | |
| 404 | Not Found - No rule matched for the hostname |
Common Use Cases
Use Case 1: DNS Server Integration
Integrate the hostcheck endpoint into your DNS resolver to filter malicious or inappropriate content in real-time. Query the endpoint before resolving hostnames and block resolution for refused domains.
Use Case 2: Proxy Server Filtering
Implement content filtering in your proxy server by checking each requested hostname against SecureDNS policies before allowing or blocking the connection.
Use Case 3: Parental Control Applications
Build parental control software that queries the endpoint when children attempt to access websites, providing real-time protection based on age-appropriate content policies.
Use Case 4: Educational Network Filtering
Deploy in school networks to ensure students can only access educational content during school hours, with automatic logging for compliance and monitoring.
Use Case 5: Corporate Content Policy
Enforce corporate internet usage policies by checking business-related hostnames and blocking access to time-wasting or inappropriate websites during work hours.
Best Practices
-
RateCachingLimitingStrategy: Implement client-side caching for frequentlycheckedqueried hostnames to reduce API calls and improve response times. Cache allow/refuse decisions for 5-15 minutes depending on your security requirements. -
Error Handling:
HandleAlways handle 404 responsesappropriatelygracefully-bytheyimplementingmayaindicatedefaulteitherpolicyno(typicallyrules existallow orcontentignore).isNetworkblockedconnectivity issues should not break your filtering system. -
Rate Limiting: Be mindful of API rate limits when integrating into high-traffic systems. Consider batching requests or implementing request queuing for busy networks.
Logging Integration: Correlate the API's built-in request logging with your own system logs to create comprehensive audit trails for compliance and troubleshooting.
Fallback Policies: Always define clear fallback behavior when the API is unavailable. Consider whether your system should fail open (allow all) or fail closed (block all) based on your security requirements.
IP Address Tracking: Include client IP addresses whenin possiblerequests forto enable more granular policy application and better audit trailslogging.