Always - Always Resolve to IP Address

Always - Always Resolve to IP Address

This is the most basic functionality, always resolving to an IP address. It responds with an A record pointing to the IPv4 address 2.3.4.5.

If an AAAA record is requested, the module responds with an AAAA record pointing to the IPv6 address 1111:2222:3333:4444:5555:6666:7777:8888.

Category: General features

Format

always.<NUMBER>.yourdomain.com

Where:

  • The <NUMBER> parameter defines how many A/AAAA records should be generated in the response.

Examples

The most basic example:

# dig always.yourdomain.com @127.0.0.1

; <<>> DiG 9.18.10-2-Debian <<>> always.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36889
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;always.yourdomain.com.		IN	A

;; ANSWER SECTION:
always.yourdomain.com.	60	IN	A	2.3.4.5

;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Wed Jan 15 00:57:33 +04 2025
;; MSG SIZE  rcvd: 55

Download PCAP File


In this example, we query for the AAAA record. As a result, an IPv6 address is returned:

# dig AAAA always.yourdomain.com @127.0.0.1

; <<>> DiG 9.18.10-2-Debian <<>> AAAA always.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20202
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;always.yourdomain.com.		IN	AAAA

;; ANSWER SECTION:
always.yourdomain.com.	60	IN	AAAA	1111:2222:3333:4444:5555:6666:7777:8888

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Wed Jan 15 00:57:34 +04 2025
;; MSG SIZE  rcvd: 67

Download PCAP File


In this example, we request to generate 10 A records:

# dig always.10.yourdomain.com @127.0.0.1

; <<>> DiG 9.18.10-2-Debian <<>> always.10.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6187
;; flags: qr aa; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;always.10.yourdomain.com.	IN	A

;; ANSWER SECTION:
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5
always.10.yourdomain.com. 60	IN	A	2.3.4.5

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Wed Jan 15 00:57:35 +04 2025
;; MSG SIZE  rcvd: 202

Download PCAP File


Like other features, you can append anything to the feature name to avoid receiving cached responses from the target DNS resolver. This forces the target resolver to actively communicate with our PolarDNS server instead of responding with cached answers. Using a random number is the most effective strategy:

# dig always${RANDOM}.10.yourdomain.com @10.211.55.2

; <<>> DiG 9.18.10-2-Debian <<>> always16187.10.yourdomain.com @10.211.55.2
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26842
;; flags: qr aa; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;always16187.10.yourdomain.com.	IN	A

;; ANSWER SECTION:
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5
always16187.10.yourdomain.com. 60 IN	A	2.3.4.5

;; Query time: 4 msec
;; SERVER: 10.211.55.2#53(10.211.55.2) (UDP)
;; WHEN: Wed Jan 15 00:57:37 +04 2025
;; MSG SIZE  rcvd: 207

Download PCAP File


From the same category


Go back to catalogue.