Category
Networking and CDN
1. Introduction
Alibaba Cloud Public DNS is a public, internet-facing DNS recursive resolver service that you can use as the DNS server for clients (laptops, phones, on-prem servers, and cloud VMs) to resolve domain names to IP addresses.
In simple terms: instead of using your ISP’s DNS servers (which can be slow, unreliable, or subject to DNS hijacking in some networks), you point your device or server to Alibaba Cloud Public DNS so that www.example.com resolves quickly and consistently.
Technically, Public DNS is a recursive DNS resolver operated by Alibaba Cloud. It receives DNS queries from clients, performs recursion (including caching), and returns answers based on the public DNS hierarchy (root → TLD → authoritative name servers). It is not the same as authoritative DNS hosting (where you manage your zone records); it is a resolver that helps you query DNS.
What problem it solves: reliable, fast, and more predictable DNS resolution—especially useful when default DNS resolvers are slow, inconsistent, filtered, or prone to manipulation. Public DNS is commonly used to reduce DNS latency, improve availability, and harden DNS resolution behavior in production environments.
Service name note: This tutorial is specifically about Alibaba Cloud Public DNS (recursive resolver). It is different from Alibaba Cloud DNS (authoritative DNS hosting, often called “Alibaba Cloud DNS” / “Alibaba Cloud DNS PrivateZone/Private DNS” depending on feature) and different from HTTPDNS (DNS-over-HTTP style resolution for apps). Verify current product naming in the official docs if Alibaba Cloud updates branding.
2. What is Public DNS?
Official purpose
Alibaba Cloud Public DNS provides public recursive DNS resolution for internet domain names. You configure clients to use Public DNS resolver IP addresses (and/or encrypted DNS endpoints if supported) so those clients can resolve DNS queries via Alibaba’s resolver infrastructure.
Core capabilities
- Recursive DNS resolution for public domain names
- DNS caching to speed up repeat lookups
- High availability resolver infrastructure (typically Anycast-based, depending on implementation—verify in official docs)
- Support for standard DNS query types (A/AAAA/CNAME/MX/TXT/SRV, etc., subject to upstream authoritative data)
- IPv4 and potentially IPv6 resolver endpoints (verify the latest endpoints in official docs)
Major components (conceptual)
Public DNS is a managed service, so you do not provision servers. Conceptually it consists of: – Resolver endpoints: IP addresses (and possibly DoH/DoT hostnames) that accept DNS queries – Recursive resolver fleet: performs recursion and caching – Network edge: routes users to optimal resolver nodes (often Anycast; verify) – Security/anti-abuse controls: rate limiting, attack mitigation, and response validation (exact mechanisms vary—verify)
Service type
- Managed public recursive resolver (internet service)
- Not a VPC-scoped “private resolver” by default
- Not authoritative DNS hosting
Scope: regional/global/zonal
- Global by nature: Public resolvers are reachable on the public internet and are not tied to a specific Alibaba Cloud region in the way compute services are.
- Not account-scoped: Typically no per-account configuration is required to use Public DNS; you simply point clients to the resolver endpoints.
- SLA/coverage: Verify the current SLA and coverage in official documentation and product pages.
How it fits into the Alibaba Cloud ecosystem
In Alibaba Cloud’s Networking and CDN landscape: – Use Public DNS when you need a reliable public resolver for clients (cloud VMs, on-prem, end-user devices). – Use Alibaba Cloud DNS (authoritative DNS) when you need to host and manage your domain’s DNS records. – Use Private DNS / PrivateZone (if applicable in your account/region) when you need internal DNS zones for VPCs (split-horizon DNS, internal service discovery). – Use HTTPDNS for application-layer DNS resolution patterns (often used to reduce DNS hijacking for mobile apps and to bypass local resolver issues—verify suitability).
3. Why use Public DNS?
Business reasons
- Better user experience: faster and more reliable DNS resolution reduces page load time and API latency.
- Reduced incident risk: avoids outages caused by flaky ISP resolvers or enterprise DNS misconfigurations.
- Operational simplicity: no need to run and patch your own recursive DNS fleet for general internet resolution.
Technical reasons
- Lower DNS latency through caching and well-connected resolver infrastructure.
- Improved availability compared to single-site resolvers.
- Consistent resolution across environments (developer laptops, CI runners, ECS instances, on-prem servers).
Operational reasons
- Fewer DNS tickets (“cannot resolve domain” / intermittent resolution).
- Easier standardization: a common resolver baseline across teams and environments.
- Simplified troubleshooting by pinning to known resolvers and comparing results.
Security/compliance reasons
- Helps reduce exposure to some classes of DNS manipulation that occur with poor-quality resolvers (exact protections vary by network—verify).
- If encrypted DNS transport is supported (DoH/DoT), it can reduce on-path snooping and tampering (verify endpoints and client support).
- Supports security hardening patterns like:
- egress DNS restrictions (send DNS only to approved resolvers)
- consistent filtering policies (if you implement them externally—Public DNS itself is not necessarily a filtering service)
Scalability/performance reasons
- Managed resolver capacity that scales beyond what a small self-managed DNS cluster can handle.
- Suitable for large fleets of clients querying public internet domains.
When teams should choose it
- You need a general-purpose public resolver for servers and endpoints.
- Your current DNS is slow/unreliable, or you operate in networks with known DNS hijacking/poisoning risks.
- You want standardized DNS behavior across multi-cloud or hybrid environments.
When teams should not choose it
- You need authoritative DNS management for your domain (use Alibaba Cloud DNS or another authoritative DNS provider).
- You need private service discovery within VPCs and split-horizon DNS for internal zones (use Private DNS/PrivateZone or VPC DNS capabilities).
- You require full query logging, per-tenant policies, or conditional forwarding controlled by your organization—Public DNS is not a customizable enterprise resolver platform in the same way as self-hosted Unbound/BIND or some dedicated resolver products.
4. Where is Public DNS used?
Industries
- E-commerce and retail (latency-sensitive web and API stacks)
- SaaS and internet services (global user base)
- Financial services (needs reliability and controlled DNS paths)
- Gaming and media (high concurrency, low latency)
- Manufacturing and IoT (distributed sites with varying ISP quality)
- Education and research (large, diverse client populations)
Team types
- Platform engineering teams standardizing base OS/network settings
- SRE/Operations teams reducing DNS-related incidents
- DevOps teams building reproducible CI/CD environments
- Security teams implementing DNS egress control and monitoring
- Developers troubleshooting DNS inconsistencies across networks
Workloads
- Web apps and APIs (outbound calls to third-party services)
- Microservices that depend on external SaaS endpoints
- CI/CD runners and build agents downloading dependencies
- Container nodes (Kubernetes worker nodes resolving external registries)
- Monitoring agents and log shippers sending to external endpoints
Architectures
- Hybrid environments: on-prem + Alibaba Cloud + other clouds
- Multi-region deployments needing consistent DNS resolution behavior
- Branch office / remote workforce where ISP DNS is unpredictable
- “Thin edge” designs where endpoints rely on public internet services
Production vs dev/test usage
- Production: common when DNS reliability is mission-critical and teams want to avoid local resolver issues.
- Dev/test: useful to reduce “works on my network” DNS differences and speed up dependency downloads.
5. Top Use Cases and Scenarios
Below are realistic scenarios where Alibaba Cloud Public DNS is a good fit. Each includes the problem, why Public DNS fits, and a short example.
1) Standardize DNS for ECS fleets
- Problem: Different ECS images and teams use different resolvers, causing inconsistent DNS behavior.
- Why it fits: Public DNS provides a consistent resolver target across instances.
- Example: A platform team enforces a baseline
/etc/resolv.conf(or systemd-resolved config) pointing to Public DNS for all non-private queries.
2) Reduce CI/CD pipeline failures caused by DNS
- Problem: Builds fail intermittently due to dependency registry resolution failures.
- Why it fits: Public DNS improves reliability and caching for repeated lookups.
- Example: GitLab runners on ECS switch from ISP DNS to Public DNS; fewer “Temporary failure in name resolution” incidents.
3) Improve resolution performance for global SaaS endpoints
- Problem: Calls to external SaaS APIs are delayed by slow DNS.
- Why it fits: Faster resolver infrastructure reduces DNS lookup time.
- Example: Payment processing service resolves multiple third-party hostnames; DNS lookup time becomes negligible.
4) Mitigate poor ISP resolver quality in branch offices
- Problem: Branch office endpoints have slow or unreliable DNS.
- Why it fits: Public DNS is reachable from most networks and offers predictable behavior.
- Example: Retail stores set DHCP DNS to Public DNS, improving POS system uptime.
5) Troubleshoot DNS poisoning/hijacking symptoms
- Problem: Users sometimes resolve a domain to the wrong IP.
- Why it fits: Switching to a trusted public resolver helps isolate whether the issue is local DNS manipulation.
- Example: A support engineer compares results from Public DNS vs default resolver to confirm a poisoning issue.
6) Provide a stable resolver for containers (non-Kubernetes)
- Problem: Container hosts sometimes inherit unstable DNS settings.
- Why it fits: Public DNS reduces dependency on local resolvers.
- Example: Docker hosts used for integration tests configure the host resolver to Public DNS.
7) Outbound-only servers in locked-down environments
- Problem: Servers have no inbound access and need a reliable resolver for outbound traffic.
- Why it fits: Public DNS is simple to use and typically doesn’t require account setup.
- Example: Log forwarders resolve
logs.example-saas.comreliably using Public DNS.
8) Multi-cloud consistency for DNS resolution
- Problem: DNS behavior differs across clouds and data centers.
- Why it fits: A shared resolver baseline reduces variability.
- Example: Workloads in Alibaba Cloud and another cloud both use Public DNS for external lookups.
9) Faster access to package repositories and OS updates
- Problem:
apt,yum, language package managers suffer from DNS slowness. - Why it fits: Cached and well-connected resolvers speed up repeated lookups.
- Example: A university lab’s Linux clients update faster after switching DNS.
10) Edge/IoT gateways resolving cloud endpoints
- Problem: IoT gateways deployed across many networks face varying DNS reliability.
- Why it fits: Public DNS provides a stable resolver target.
- Example: Gateways resolve MQTT endpoints consistently using Public DNS.
11) Benchmarking and DNS SLO monitoring
- Problem: No baseline to measure DNS resolution performance.
- Why it fits: Public DNS can serve as a benchmark resolver.
- Example: SRE team runs periodic
digchecks against Public DNS and internal resolvers to detect regressions.
12) Improve user experience for internal corporate devices (BYOD/remote)
- Problem: Remote employees see intermittent “site not found” issues.
- Why it fits: Public DNS offers a reliable option without VPN dependency.
- Example: IT recommends Public DNS configuration for troubleshooting and as a fallback resolver.
6. Core Features
Public DNS is a managed resolver, so features focus on resolution quality, availability, and client compatibility. Feature availability can vary by geography and product updates—verify details in official Alibaba Cloud documentation.
1) Public recursive DNS resolution
- What it does: Resolves public DNS queries by performing recursion from root/TLD to authoritative servers, then caches answers.
- Why it matters: Most clients need recursion; authoritative servers alone won’t answer arbitrary queries.
- Practical benefit: Stable resolution for
A,AAAA,CNAME,MX,TXT, etc. - Caveats: You cannot manage zone records via Public DNS (that’s authoritative DNS).
2) Caching for performance
- What it does: Stores DNS answers for their TTL duration.
- Why it matters: Reduces latency and upstream query volume.
- Practical benefit: Faster repeated lookups (common in microservices and CI).
- Caveats: Cached answers remain until TTL expiry; rapid DNS changes may not be seen immediately.
3) High availability resolver infrastructure
- What it does: Operates a distributed resolver fleet.
- Why it matters: DNS is a critical dependency; resolver downtime impacts everything.
- Practical benefit: Better resilience than single-server resolvers.
- Caveats: SLA and operational transparency vary—verify in official docs.
4) IPv4 resolver endpoints (and possibly IPv6)
- What it does: Provides resolver access over IPv4, and may provide IPv6 endpoints.
- Why it matters: Modern environments increasingly require IPv6 readiness.
- Practical benefit: Works for IPv4-only and dual-stack networks.
- Caveats: Confirm latest endpoint IPs in official docs before standardizing.
5) Standards-based DNS protocol support
- What it does: Supports standard UDP/TCP DNS resolution (port 53).
- Why it matters: Maximum compatibility with OS resolvers and network devices.
- Practical benefit: Works without special client software.
- Caveats: Plain DNS is not encrypted; consider encrypted transports if available and required.
6) Security and anti-abuse protections (service-side)
- What it does: Resolver operators typically implement DDoS mitigation, rate limiting, and response integrity checks.
- Why it matters: Public resolvers are common attack targets.
- Practical benefit: Better survivability under abusive traffic patterns.
- Caveats: Exact protections and guarantees are not always publicly detailed—verify.
7) Optional encrypted DNS transports (DoH/DoT) (verify)
- What it does: DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) encrypts DNS queries in transit.
- Why it matters: Helps protect DNS privacy and integrity on untrusted networks.
- Practical benefit: Reduces risk of on-path tampering and passive DNS snooping.
- Caveats: Client support varies; endpoint hostnames and policies must be confirmed in official docs.
8) Compatibility with enterprise network patterns
- What it does: Can be used as upstream resolver for forwarders or DNS proxy appliances.
- Why it matters: Enterprises often centralize DNS but still need reliable upstream recursion.
- Practical benefit: Use internal resolvers for policy/logging, forward to Public DNS for recursion.
- Caveats: Ensure you don’t create forwarding loops; test carefully.
7. Architecture and How It Works
High-level architecture
Public DNS sits between your clients and the global DNS hierarchy:
- A client (ECS instance, laptop, container node) sends a DNS query to the configured resolver IP.
- Public DNS checks its cache:
– If cached and valid → responds immediately.
– If not cached → performs recursion:
- queries root servers
- queries TLD servers
- queries authoritative servers for the domain
- Public DNS returns the final answer to the client and caches it for the TTL.
Request/data/control flow
- Data plane (DNS queries): client → resolver endpoint → recursion/caching → client response
- Control plane: typically minimal/no customer control plane; configuration is mostly on the client side (OS/router/DHCP).
Integrations with related services
Public DNS is commonly used alongside: – Alibaba Cloud ECS (clients running on ECS) – Alibaba Cloud VPC DNS / internal DNS (for private name resolution inside VPC) – Alibaba Cloud DNS (authoritative) (when you host zones on Alibaba Cloud DNS, clients can still resolve them via Public DNS, like any resolver) – Security tooling (firewalls restricting DNS egress; DNS monitoring with synthetic checks)
Dependency services
- Global DNS hierarchy (root/TLD/authoritative name servers)
- Alibaba Cloud backbone and resolver infrastructure
- Client OS stub resolvers
Security/authentication model
- Public DNS is generally open to the public (like other public resolvers).
- There is usually no IAM-based authentication for basic usage.
- Security controls are therefore mostly:
- network-based (who can query from where)
- abuse prevention on the resolver side
- your own egress control and monitoring
Networking model
- Clients query Public DNS over:
- UDP/53 (most common)
- TCP/53 (for large responses, zone transfers are not relevant here)
- Possibly DoT/853 and DoH/443 (verify availability)
Monitoring/logging/governance considerations
Because Public DNS is managed and public:
– You typically cannot access resolver query logs like you could on a self-hosted resolver.
– Governance and observability are implemented via:
– client-side metrics (latency, failure rate)
– synthetic probes (dig/kdig from multiple locations)
– network flow logs (if you control the network path)
– egress firewall rules restricting DNS to approved resolvers
Simple architecture (Mermaid)
flowchart LR
C[Client: ECS / Laptop / On-prem Server] -->|DNS Query UDP/TCP 53| PDNS[Alibaba Cloud Public DNS]
PDNS -->|Recursive queries| ROOT[Root Servers]
PDNS --> TLD[TLD Servers]
PDNS --> AUTH[Authoritative DNS for domain]
PDNS -->|Answer + TTL| C
Production-style architecture (Mermaid)
flowchart TB
subgraph ClientNetwork["Enterprise / Cloud Client Networks"]
ECS[ECS Instances]
K8S[Kubernetes Nodes]
ONP[On-prem Servers]
LAP[Remote Laptops]
end
subgraph Controls["Controls & Observability (Your Side)"]
FW[Firewall / Egress Policy\nAllow DNS only to approved resolvers]
SYN[Synthetic DNS Probes\n(dig/kdig scheduled)]
MON[Monitoring & Alerts\nLatency, SERVFAIL rate]
end
subgraph Alibaba["Alibaba Cloud (Managed)"]
PDNS[Public DNS Resolver Endpoints]
CACHE[Resolver Cache & Recursion Fleet]
end
subgraph InternetDNS["Public DNS Ecosystem"]
ROOT[Root]
TLD[TLD]
AUTH[Authoritative Name Servers]
end
ECS --> FW --> PDNS
K8S --> FW --> PDNS
ONP --> FW --> PDNS
LAP --> PDNS
PDNS --> CACHE --> ROOT
CACHE --> TLD
CACHE --> AUTH
SYN --> PDNS
PDNS --> MON
8. Prerequisites
Public DNS can be used without an Alibaba Cloud account (because it’s public). However, this tutorial includes an optional lab on an Alibaba Cloud ECS instance for a controlled environment.
Account/subscription requirements
- For basic usage: none (public service)
- For the hands-on ECS lab: an Alibaba Cloud account with billing enabled
Permissions / IAM roles
- To create and manage ECS resources: a RAM user/role with permissions such as:
ecs:*for the lab (broad)- Prefer least privilege in real environments (create instance, VPC, security group, delete resources)
Billing requirements
- Public DNS usage is typically free.
- The lab may incur costs for:
- ECS instance runtime
- EIP (if used)
- storage and outbound bandwidth
- If you use an existing ECS instance, no extra provisioning cost is needed beyond your current resources.
CLI/SDK/tools needed
- For validation:
dig(bind-utils / dnsutils)nslookup(often preinstalled)resolvectl(if using systemd-resolved)- Optional:
tcpdumpfor troubleshooting
Region availability
- Public DNS endpoints are global; connectivity depends on your network.
- ECS lab can be performed in any region where you can create ECS.
Quotas/limits
- Public DNS may apply rate limiting to prevent abuse (verify exact limits in official docs).
- ECS quotas apply for instance creation.
Prerequisite services (for the lab)
- Alibaba Cloud ECS
- VPC + Security Group (standard ECS setup)
9. Pricing / Cost
Current pricing model (accurate description)
Alibaba Cloud Public DNS is typically offered as a free public recursive DNS resolver. There is usually no per-query bill from Alibaba Cloud for standard usage of a public resolver.
However, pricing and service terms can change; in some clouds, advanced resolver features or enterprise offerings may be paid. Verify current pricing and terms in the official Alibaba Cloud Public DNS product page and documentation.
Pricing dimensions (what could matter)
For Public DNS itself, typically: – No charge per DNS query – No subscription fee
For your overall solution, costs often come from: – Compute: ECS instances if you run forwarders, DNS proxies, or monitoring – Network egress: traffic to the internet for recursion from your network (usually small per query, but can add up at scale) – Operational tooling: monitoring systems, logging, SIEM ingestion
Free tier
- Public DNS itself is commonly free.
- Your lab environment may not be free unless you use free-tier ECS (if available in your account/region).
Cost drivers (direct and indirect)
- DNS query volume from large fleets (not billed by Public DNS in most cases, but impacts your network and monitoring)
- High-frequency retry storms during outages (can amplify query volume)
- Synthetic probing from many locations (tiny but can add noise)
- If you deploy internal DNS forwarders for policy/logging, the forwarders’ compute and operations cost can dominate
Hidden or indirect costs
- Misconfiguration causing retry storms: can create a burst of DNS traffic and cascading failures.
- Poor caching / low TTL settings: forces more frequent lookups, increasing latency and upstream dependency.
- Overly strict firewalling: blocks TCP/53 fallback, causing resolution issues for large DNS responses.
Network/data transfer implications
- DNS packets are small, but high QPS environments (large Kubernetes clusters, service meshes, CI fleets) can generate meaningful DNS traffic.
- If you rely on encrypted DNS (DoH/DoT), overhead per query can increase due to TLS and HTTP framing.
How to optimize cost
- Prefer OS and application caching where appropriate.
- Run a small set of internal caching forwarders (optional) to reduce repeated external recursion and to centralize policies—only if you truly need that control.
- Set sensible timeouts and retries in your stub resolvers to prevent query storms.
- Monitor DNS failure rates and latencies to catch regressions early.
Example low-cost starter estimate
- Public DNS: typically $0
- Lab ECS instance: cost depends on region, instance type, and runtime duration. Use the smallest practical instance, run the lab quickly, and stop/delete resources immediately after.
Example production cost considerations
- Public DNS: typically $0
- You may still budget for:
- 2–3 small ECS instances as DNS forwarders (if you need internal policy/logging)
- Monitoring and alerting (Prometheus/Grafana or managed monitoring)
- Network/security operations
Official references to check
– Alibaba Cloud pricing landing page: https://www.alibabacloud.com/pricing
– Alibaba Cloud pricing calculator (if applicable in your locale): https://www.alibabacloud.com/pricing/calculator
– Public DNS product and documentation pages: verify current URLs in Alibaba Cloud Help Center (search for “Public DNS”).
10. Step-by-Step Hands-On Tutorial
This lab shows how to use Alibaba Cloud Public DNS on an ECS Linux instance, validate DNS resolution, measure latency, and safely roll back.
Objective
Configure an Alibaba Cloud ECS instance to use Alibaba Cloud Public DNS resolvers for outbound DNS queries, then validate: – name resolution works – which resolver is being used – latency and reliability compared to the previous configuration
Lab Overview
You will:
1. Create (or reuse) a small ECS Linux instance.
2. Install DNS tools (dig).
3. Record the current DNS configuration and baseline query performance.
4. Configure the instance to use Alibaba Cloud Public DNS.
5. Validate functionality and compare performance.
6. Troubleshoot common issues.
7. Clean up or roll back configuration.
Resolver endpoints note: Alibaba Cloud Public DNS is widely referenced with IPv4 resolver IPs 223.5.5.5 and 223.6.6.6. Confirm the current recommended resolver IPs (and IPv6 endpoints) in official Alibaba Cloud documentation before rolling to production.
Step 1: Prepare an ECS instance
Option A: Use an existing ECS instance – Ensure you have shell access (SSH) and permission to edit DNS settings.
Option B: Create a new ECS instance (quick lab) 1. In the Alibaba Cloud console, go to ECS. 2. Create an instance: – Image: Alibaba Cloud Linux 3 / CentOS / Ubuntu (any mainstream distro is fine) – Instance type: small/low-cost – Network: VPC with security group allowing SSH (22) from your IP 3. Allocate a public IP/EIP if you need internet SSH access, or use a bastion host.
Expected outcome: You can SSH into the server.
Step 2: Install DNS utilities (dig) and capture baseline
SSH into the instance and run:
For Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y dnsutils
For CentOS/RHEL/Alibaba Cloud Linux
sudo yum install -y bind-utils
Now capture your current resolver configuration:
cat /etc/resolv.conf
Run a few baseline DNS queries:
dig www.alibabacloud.com +stats
dig www.google.com +stats
dig www.cloudflare.com +stats
Expected outcome:
– dig returns an ANSWER SECTION.
– The Query time: line shows baseline latency.
– You have a record of what DNS servers were previously configured.
Tip: If your system uses
systemd-resolved,/etc/resolv.confmay point to127.0.0.53. That is normal; you’ll change systemd-resolved settings instead of editingresolv.confdirectly.
Step 3: Determine how DNS is managed on the instance
Run:
ps -p 1 -o comm=
If it returns systemd, check if systemd-resolved is active:
sudo systemctl status systemd-resolved --no-pager
Also check:
ls -l /etc/resolv.conf
- If
/etc/resolv.confis a symlink to systemd-resolved stub, use Step 4A. - If it’s a regular file managed by NetworkManager or static config, use Step 4B.
Expected outcome: You know whether to configure DNS via systemd-resolved or by editing configuration files.
Step 4A: Configure Alibaba Cloud Public DNS with systemd-resolved (recommended where available)
Edit the systemd-resolved config:
sudo nano /etc/systemd/resolved.conf
Set (or add) DNS= to the Alibaba Cloud Public DNS IPs:
[Resolve]
DNS=223.5.5.5 223.6.6.6
FallbackDNS=
Restart the resolver:
sudo systemctl restart systemd-resolved
Check effective configuration:
resolvectl status
Expected outcome:
– resolvectl status shows the DNS servers as 223.5.5.5 and 223.6.6.6 for the relevant link or globally.
– DNS queries succeed.
Step 4B: Configure Alibaba Cloud Public DNS via NetworkManager or static resolv.conf
If NetworkManager is installed
Check:
sudo systemctl status NetworkManager --no-pager
nmcli dev show | grep -i dns
Set DNS for your active connection (example; adjust connection name):
nmcli con show
sudo nmcli con mod "<YOUR_CONNECTION_NAME>" ipv4.dns "223.5.5.5 223.6.6.6"
sudo nmcli con mod "<YOUR_CONNECTION_NAME>" ipv4.ignore-auto-dns yes
sudo nmcli con up "<YOUR_CONNECTION_NAME>"
Verify:
nmcli dev show | grep -i dns
cat /etc/resolv.conf
If using a static /etc/resolv.conf (not recommended long-term)
Edit the file:
sudo cp /etc/resolv.conf /etc/resolv.conf.bak.$(date +%F)
sudo nano /etc/resolv.conf
Set:
nameserver 223.5.5.5
nameserver 223.6.6.6
options timeout:2 attempts:2
Expected outcome:
– /etc/resolv.conf shows the Public DNS nameservers.
– DNS queries succeed.
Caveat: Many distros overwrite
/etc/resolv.confon reboot or interface restart. Prefer systemd-resolved or NetworkManager configuration.
Step 5: Validate resolution and measure improvement
Run:
dig www.alibabacloud.com +stats
dig www.alibabacloud.com @223.5.5.5 +stats
dig www.alibabacloud.com @223.6.6.6 +stats
Check that the resolver being used matches your configuration:
– If using systemd-resolved, resolvectl status should show it.
– If using direct resolv.conf, the default dig should use those nameservers.
Test multiple record types:
dig alibabacloud.com MX +short
dig alibabacloud.com TXT +short
dig www.alibabacloud.com AAAA +short
Expected outcome: – Successful answers for A/AAAA (where available). – Query times that are stable and often improved compared to baseline (exact results depend on location/network).
Step 6: Verify reliability (basic SERVFAIL/NXDOMAIN behavior)
Run a known-nonexistent name query:
dig nonexistent-subdomain-verify-12345.alibabacloud.com +stats
Expected outcome:
– You receive NXDOMAIN (expected for a non-existent name), not timeouts.
Validation
Use this checklist:
-
Resolver configured – systemd-resolved:
resolvectl statusshows223.5.5.5 223.6.6.6– or/etc/resolv.confshows those servers -
DNS works –
dig www.alibabacloud.comreturnsNOERRORand an answer -
Latency measured –
Query time:is captured for baseline and after change -
No unexpected breakage – Applications that depend on DNS (package managers, curl) function normally
Optional validation (network path):
nc -vz 223.5.5.5 53
nc -vu 223.5.5.5 53
Troubleshooting
Issue: dig times out (no servers could be reached)
- Check outbound rules: security group/NACL/firewall may block UDP/53 or TCP/53.
- Fix: allow egress to resolver IPs on UDP/53 and TCP/53.
Issue: /etc/resolv.conf keeps reverting
- Cause: NetworkManager, cloud-init, or systemd-resolved overwrites it.
- Fix: configure DNS in the correct manager:
- systemd-resolved:
/etc/systemd/resolved.conf - NetworkManager:
nmcli con mod ... ipv4.dns ...
Issue: Internal/private hostnames stop resolving
- Cause: You replaced VPC/internal DNS resolver with a public resolver; private zones won’t resolve publicly.
- Fix options:
- Keep VPC DNS for internal zones and forward public queries appropriately (common pattern: local resolver/forwarder).
- Use split DNS configuration (advanced) or a local forwarder (Unbound/dnsmasq) that forwards private zones to internal resolvers and everything else to Public DNS.
Issue: Some domains resolve differently than expected
- Cause: DNS is influenced by geo/anycast routing, CDN policies, and EDNS behavior.
- Fix: compare results against multiple resolvers, verify authoritative records, and confirm expected CDN behavior.
Cleanup
If this was a temporary test, roll back:
For systemd-resolved
- Restore previous
/etc/systemd/resolved.conf(if you backed it up). - Restart:
sudo systemctl restart systemd-resolved
For NetworkManager
Re-enable DHCP-provided DNS:
sudo nmcli con mod "<YOUR_CONNECTION_NAME>" ipv4.ignore-auto-dns no
sudo nmcli con up "<YOUR_CONNECTION_NAME>"
If you edited /etc/resolv.conf directly
Restore the backup:
sudo cp /etc/resolv.conf.bak.* /etc/resolv.conf
If you created a new ECS instance
- Stop and release the instance
- Release EIP (if allocated)
- Delete unused disks/snapshots created for the lab
Expected outcome: No ongoing compute charges for the lab environment.
11. Best Practices
Architecture best practices
- Use the right DNS service for the job:
- Public recursion → Public DNS
- Authoritative zones → Alibaba Cloud DNS
- Private zones/service discovery → Private DNS/PrivateZone (if applicable) or VPC DNS features
- Consider local caching forwarders for large fleets:
- reduces external dependency
- centralizes timeout/retry behavior
- enables conditional forwarding (private vs public)
IAM/security best practices
- Public DNS itself usually doesn’t use IAM, but your infrastructure changes do:
- restrict who can change OS images, DHCP options, or instance network configs
- use change control for DNS settings (IaC + approvals)
- Maintain least privilege for ECS and network changes using Alibaba Cloud RAM.
Cost best practices
- Public DNS is typically free, but:
- avoid unnecessary query volume (DNS storms)
- ensure application-level caching where safe
- keep TTLs reasonable on your authoritative records (when you control them)
Performance best practices
- Configure two resolvers for redundancy.
- Ensure both UDP/53 and TCP/53 are allowed (TCP matters for large responses and reliability).
- Tune resolver timeouts to avoid long stalls:
- Example:
options timeout:2 attempts:2(adjust to your SLOs)
Reliability best practices
- Use health checks (synthetic probes) from representative networks.
- Track DNS error rates: SERVFAIL, timeouts, NXDOMAIN (unexpected), and latency percentiles.
- Plan a rollback path (golden AMI images, baseline config backups).
Operations best practices
- Manage DNS configuration via:
- configuration management (Ansible/Salt)
- cloud-init where appropriate (with care)
- immutable images and instance profiles
- Document resolver endpoints and fallback plan.
Governance/tagging/naming best practices
- If you deploy forwarder instances, standardize:
- naming:
dns-forwarder-prod-a,dns-forwarder-prod-b - tags:
service=dns,env=prod,owner=platform,cost-center=... - Track resolver configuration changes in Git.
12. Security Considerations
Identity and access model
- Public DNS is generally open; you don’t authenticate to query it.
- Security therefore shifts to:
- controlling which resolvers your clients can query
- monitoring for suspicious DNS patterns
- protecting your own authoritative DNS accounts/registrar from takeover
Encryption
- Plain DNS (UDP/TCP 53) is not encrypted.
- If Alibaba Cloud Public DNS supports DoH/DoT, you can encrypt DNS in transit (verify endpoints, certificates, and client support in official docs).
- If you cannot use encrypted DNS, mitigate by:
- restricting DNS egress to trusted resolvers
- using VPN or trusted networks for sensitive environments
Network exposure
- Allowing arbitrary DNS to the internet can enable data exfiltration via DNS tunneling.
- Recommended:
- egress firewall policies: allow DNS only to approved resolvers (Public DNS IPs or your forwarders)
- monitor for unusual query patterns (high entropy subdomains, high QPS)
Secrets handling
- Don’t store secrets in DNS TXT records unless you understand visibility and caching implications.
- Assume public DNS queries can be observed by resolver operators and potentially on-path devices if not encrypted.
Audit/logging
- Public DNS usually does not provide per-customer query logs.
- If you need audit trails:
- run internal forwarders and log queries locally
- use network flow logs to see DNS traffic to resolver IPs
Compliance considerations
- DNS queries can contain sensitive metadata (internal hostnames, service endpoints).
- Consider:
- whether sending DNS traffic to a public resolver meets your regulatory and data residency requirements
- using private resolvers for internal namespaces and limiting what is sent publicly
Common security mistakes
- Replacing internal DNS with Public DNS and leaking internal hostnames (or breaking internal resolution).
- Leaving unrestricted DNS egress, enabling DNS tunneling.
- Assuming public resolvers provide content filtering or malware blocking by default.
Secure deployment recommendations
- Use split DNS: internal zones resolved internally; public zones resolved via Public DNS.
- Restrict DNS egress to approved resolvers.
- Monitor DNS latency and failure rate—security incidents often show up as DNS anomalies.
13. Limitations and Gotchas
- Not authoritative DNS: you cannot host or manage zone records in Public DNS.
- Limited configurability: no per-customer conditional forwarding, policy controls, or query logs in typical public resolver offerings.
- Private names won’t resolve: internal VPC/private zones require internal resolvers or Private DNS/PrivateZone.
- Caching can delay changes: TTL-based caching means record changes may not propagate instantly.
- Rate limiting/abuse controls: public resolvers may throttle high-volume or suspicious traffic (verify exact behavior).
- Plain DNS visibility: unless encrypted DNS is used, queries can be observed or modified on-path in hostile networks.
- TCP/53 sometimes blocked: some networks block TCP/53, causing failures for large responses (DNSSEC, large TXT records).
- Geo/CDN differences: different resolvers can produce different CDN endpoints due to geo routing and EDNS behavior.
- Endpoint changes: public resolver IPs or recommended endpoints can change over time—confirm via official docs before hard-coding into enterprise baselines.
- No guaranteed internal SLA disclosure: public services may not offer the same support/SLA as paid enterprise offerings—verify.
14. Comparison with Alternatives
Public DNS is one option in the DNS stack. Here’s how it compares to adjacent options.
Comparison table
| Option | Best For | Strengths | Weaknesses | When to Choose |
|---|---|---|---|---|
| Alibaba Cloud Public DNS | Fast, simple public recursion | Easy to adopt; typically free; good baseline resolver | Limited enterprise controls and logging; not authoritative | You need reliable public DNS resolution for clients |
| Alibaba Cloud DNS (authoritative) | Hosting DNS zones/records | Manage records, routing policies (depending on edition), integration with Alibaba Cloud | Not a recursive resolver for clients | You own a domain and need authoritative DNS hosting |
| Alibaba Cloud Private DNS / PrivateZone (verify exact product name in your console) | Internal service discovery and private zones | Private namespaces, split-horizon DNS | Not for general public recursion alone | You need internal DNS for VPC resources |
| HTTPDNS (Alibaba Cloud) | App-level DNS resolution patterns | Can mitigate local DNS hijacking for apps; avoids some resolver path issues | Requires app integration; not OS-level DNS | Mobile/embedded apps with DNS hijack concerns (verify features) |
| Cloudflare Resolver (1.1.1.1) | Global public recursion | Strong performance and privacy posture (varies by policy) | Policy may differ; may be blocked in some networks | You want a widely used public resolver alternative |
| Google Public DNS (8.8.8.8) | Global public recursion | Highly available; widely reachable | Policy/telemetry considerations | You need a ubiquitous fallback resolver |
| Quad9 (9.9.9.9) | Security-focused public recursion | Malware-blocking options | Can block domains; not suitable for all orgs | You want resolver-level threat blocking |
| Self-managed Unbound/BIND | Full control, logging, conditional forwarding | Custom policies, logs, internal zones, strict governance | Operational burden, patching, scaling | You need enterprise control and auditability |
15. Real-World Example
Enterprise example: Hybrid retail platform with branch offices
- Problem: Hundreds of branch offices have inconsistent ISP DNS performance, causing intermittent failures for cloud-based POS and inventory APIs.
- Proposed architecture:
- Branch routers/DHCP provide DNS servers pointing to:
- primary: internal forwarder (if deployed in HQ/VPN) or directly to Public DNS
- secondary: Public DNS as fallback
- Central monitoring runs synthetic DNS checks from representative branches.
- Egress firewall policies restrict DNS to approved resolvers.
- Why Public DNS was chosen:
- Easy rollout across diverse networks
- Improved resolution reliability without deploying DNS servers at every branch
- Expected outcomes:
- Reduced DNS-related incidents
- Improved API call reliability and faster application startup
- Clear operational baseline for troubleshooting
Startup/small-team example: SaaS on Alibaba Cloud ECS and managed databases
- Problem: CI pipelines and ECS instances intermittently fail resolving package registries and third-party APIs.
- Proposed architecture:
- Standardize ECS images to use Alibaba Cloud Public DNS for external lookups.
- Keep VPC/internal DNS for private hostnames (if needed).
- Add lightweight synthetic checks in the monitoring stack.
- Why Public DNS was chosen:
- Near-zero cost
- Minimal configuration effort
- Reduced operational overhead versus running Unbound/BIND
- Expected outcomes:
- More stable CI runs
- Faster dependency downloads
- Fewer “DNS flake” incidents
16. FAQ
1) Is Alibaba Cloud Public DNS the same as Alibaba Cloud DNS (authoritative)?
No. Public DNS is a recursive resolver you point clients to. Alibaba Cloud DNS is authoritative DNS hosting where you manage zone records for your domains.
2) Do I need an Alibaba Cloud account to use Public DNS?
Typically no—public resolvers can be used by anyone. For Alibaba Cloud ECS lab work, you need an account to create instances.
3) What are the Alibaba Cloud Public DNS resolver IPs?
Commonly referenced IPv4 resolver IPs are 223.5.5.5 and 223.6.6.6. Confirm the latest recommended endpoints in official Alibaba Cloud documentation before production rollout.
4) Is Public DNS free?
Public DNS is generally offered as a free public resolver. Verify current terms on the official product page.
5) Can Public DNS resolve my private VPC hostnames?
No. Private zones require VPC/internal DNS or Private DNS/PrivateZone. Public resolvers do not have access to your private namespace.
6) Should I replace my VPC DNS with Public DNS on ECS?
Not blindly. If you need internal resolution (private zones, internal endpoints), keep internal resolvers for those zones. Consider a split DNS approach or an internal forwarder.
7) Does Public DNS support DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT)?
It may, depending on Alibaba Cloud’s current offering. Verify official documentation for supported encrypted DNS endpoints and recommended client configuration.
8) How do I measure whether Public DNS is faster?
Use dig +stats and compare Query time across multiple runs and multiple domains, from the same host and network.
9) Why do different DNS resolvers return different IPs for the same domain?
CDNs and geo load balancers may respond differently based on resolver location and EDNS behavior. Different resolvers can legitimately yield different “best” endpoints.
10) Can I get DNS query logs from Public DNS?
Typically no. If you need logs for audit/troubleshooting, run internal forwarders and log queries there.
11) What’s the best practice for redundancy?
Configure at least two resolver endpoints. Ensure your OS resolver failover behavior is tested (timeouts, attempts, ordering).
12) What ports must be allowed?
At minimum: UDP/53. Also allow TCP/53 to handle large responses and retries reliably.
13) Can Public DNS help mitigate DNS hijacking?
Using a reputable resolver can reduce exposure to poor or malicious ISP resolvers. For on-path tampering, encrypted DNS (DoH/DoT) is stronger—verify if Public DNS supports it and whether it fits your compliance requirements.
14) Is it safe to use a public resolver for enterprise workloads?
Often yes for public domains, but consider compliance, privacy, and logging needs. Many enterprises use internal forwarders for governance and send recursion upstream to a trusted resolver.
15) What if my network blocks access to Public DNS?
Some corporate or ISP networks restrict DNS. In that case, use internal resolvers, DoH (if allowed), or a VPN-based DNS strategy.
17. Top Online Resources to Learn Public DNS
Because Alibaba Cloud documentation URLs can vary by locale and may change, verify the exact current links in the Alibaba Cloud Help Center by searching for “Public DNS”.
| Resource Type | Name | Why It Is Useful |
|---|---|---|
| Official documentation | Alibaba Cloud Help Center (search “Public DNS”) – https://www.alibabacloud.com/help | Entry point to current Public DNS docs, endpoints, and configuration guidance |
| Official product page | Alibaba Cloud product pages – https://www.alibabacloud.com | Confirms positioning, availability, and links to docs (navigate to Networking and CDN → Public DNS) |
| Official pricing | Alibaba Cloud Pricing – https://www.alibabacloud.com/pricing | Confirms pricing model and related cost considerations |
| Pricing calculator | Alibaba Cloud Pricing Calculator – https://www.alibabacloud.com/pricing/calculator | Helpful for estimating ECS costs if you deploy DNS forwarders/monitors |
| DNS concepts | Alibaba Cloud Help Center: DNS/Domain documentation – https://www.alibabacloud.com/help | Background on authoritative DNS vs resolvers (navigate within DNS-related docs) |
| Troubleshooting basics | dig manual and DNS troubleshooting guides (community) |
Practical skills for measuring DNS latency, SERVFAIL, caching behavior |
| Standards reference | RFC 1034/1035 (DNS), RFC 7858 (DoT), RFC 8484 (DoH) | Protocol-level understanding of DNS and encrypted transports |
18. Training and Certification Providers
| Institute | Suitable Audience | Likely Learning Focus | Mode | Website |
|---|---|---|---|---|
| DevOpsSchool.com | DevOps engineers, SREs, cloud engineers | Cloud fundamentals, networking, DevOps practices (verify course catalog) | Check website | https://www.devopsschool.com |
| ScmGalaxy.com | Beginners to intermediate DevOps learners | SCM, CI/CD, DevOps tooling, basics of cloud/networking (verify) | Check website | https://www.scmgalaxy.com |
| CLoudOpsNow.in | Cloud operations teams | Cloud operations, monitoring, reliability practices (verify) | Check website | https://www.cloudopsnow.in |
| SreSchool.com | SREs and operations engineers | Reliability engineering, incident response, observability (verify) | Check website | https://www.sreschool.com |
| AiOpsSchool.com | Ops/SRE teams exploring AIOps | AIOps concepts, automation, monitoring analytics (verify) | Check website | https://www.aiopsschool.com |
19. Top Trainers
| Platform/Site | Likely Specialization | Suitable Audience | Website |
|---|---|---|---|
| RajeshKumar.xyz | DevOps/cloud training and mentoring (verify offerings) | Beginners to experienced engineers | https://www.rajeshkumar.xyz |
| devopstrainer.in | DevOps and cloud training (verify offerings) | Teams and individuals | https://www.devopstrainer.in |
| devopsfreelancer.com | Freelance DevOps enablement (verify offerings) | Startups and small teams | https://www.devopsfreelancer.com |
| devopssupport.in | DevOps support and training resources (verify offerings) | Operations teams | https://www.devopssupport.in |
20. Top Consulting Companies
| Company | Likely Service Area | Where They May Help | Consulting Use Case Examples | Website |
|---|---|---|---|---|
| cotocus.com | DevOps, cloud, platform engineering (verify services) | Cloud networking baselines, DNS strategy, migration planning | Standardizing DNS across hybrid networks; implementing internal forwarders and monitoring | https://www.cotocus.com |
| DevOpsSchool.com | DevOps consulting and training (verify services) | Architecture reviews, DevOps transformation, operational readiness | DNS reliability assessment; implementing IaC for network/DNS configuration | https://www.devopsschool.com |
| DEVOPSCONSULTING.IN | DevOps consulting (verify services) | Operations maturity, CI/CD, cloud adoption | DNS troubleshooting playbooks; monitoring and incident response setup | https://www.devopsconsulting.in |
21. Career and Learning Roadmap
What to learn before this service
- DNS fundamentals: recursion vs authoritative DNS, TTL, record types
- Linux networking basics:
/etc/resolv.conf, systemd-resolved, NetworkManager - Basic cloud networking: VPC concepts, security groups, egress rules
- Troubleshooting tools:
dig,nslookup,tcpdump
What to learn after this service
- Authoritative DNS design (Alibaba Cloud DNS or equivalent)
- Private DNS and service discovery patterns in VPCs
- DNS security:
- DNSSEC concepts (signing vs validation)
- DoH/DoT deployment tradeoffs
- DNS exfiltration detection
- Observability:
- synthetic DNS probes
- error budget/SLO design for DNS
- Advanced: running Unbound/dnsdist for enterprise DNS policy and logging
Job roles that use it
- Cloud Engineer / Cloud Operations Engineer
- SRE / Production Engineer
- Network Engineer / Cloud Network Engineer
- DevOps Engineer / Platform Engineer
- Security Engineer (network security, detection engineering)
Certification path (if available)
- Alibaba Cloud certifications often include networking components. Verify the latest Alibaba Cloud certification tracks and exam objectives on official Alibaba Cloud certification pages (naming and availability can change).
Project ideas for practice
- DNS baseline project: write an Ansible role to configure resolvers on Linux hosts and validate with
dig. - Synthetic DNS monitoring: schedule probes from multiple VMs and alert on latency/SERVFAIL.
- Split DNS lab: run Unbound as a forwarder that sends
corp.internalto private DNS and everything else to Public DNS. - Incident drill: simulate DNS outage by blocking UDP/53 and confirm rollback and failover behavior.
22. Glossary
- DNS (Domain Name System): System that maps names (e.g.,
example.com) to IP addresses. - Recursive resolver: DNS server that performs recursion on behalf of a client and caches answers.
- Authoritative DNS: DNS servers that host the official records for a domain/zone.
- TTL (Time To Live): How long a DNS answer may be cached.
- NXDOMAIN: Response code indicating the domain name does not exist.
- SERVFAIL: Response code indicating a server failure (often upstream issues, DNSSEC validation failure, or timeouts).
- Anycast: Network routing technique where the same IP is advertised from multiple locations; clients reach a “nearest” node.
- DoH (DNS over HTTPS): DNS queries sent over HTTPS (TCP/443), encrypted with TLS.
- DoT (DNS over TLS): DNS queries sent over TLS (typically TCP/853).
- Stub resolver: The local resolver on a host (OS component) that forwards queries to configured recursive resolvers.
- Forwarder: A DNS server that forwards queries to upstream resolvers rather than performing full recursion itself.
- Split-horizon DNS: Different DNS answers depending on client location/network (e.g., internal vs external).
- DNS hijacking/poisoning: Manipulation of DNS responses to redirect traffic to incorrect destinations.
23. Summary
Alibaba Cloud Public DNS is a managed public recursive DNS resolver in the Networking and CDN category. It helps clients resolve internet domain names reliably and often faster than default ISP resolvers, with minimal setup (configure resolver endpoints on your OS, DHCP, or forwarders).
It matters because DNS is a dependency for nearly every workload: improving DNS reliability can reduce incidents, speed up outbound calls, stabilize CI/CD pipelines, and simplify troubleshooting. Public DNS fits best as a standard resolver baseline for public domains, while authoritative DNS and private DNS should be handled by Alibaba Cloud DNS and Private DNS/PrivateZone (as applicable).
Cost is typically low to zero for Public DNS itself, but you should account for indirect costs like ECS instances if you deploy internal forwarders and the operational cost of monitoring and governance. From a security perspective, focus on DNS egress control, split DNS for private namespaces, and encrypted DNS transports if supported and required.
Next step: confirm the current Public DNS endpoints and any encrypted DNS options in official Alibaba Cloud documentation, then roll out Public DNS to a small canary group of hosts with synthetic monitoring before broad production adoption.