0

I have a DNSMasq setup and it is resolving the local queries correctly.

My /etc/resolv.conf

nameserver 67.207.67.2
nameserver 67.207.67.3
nameserver 127.0.0.1

My /etc/dnsmasq.conf

log-queries
listen-address=127.0.0.1
resolv-file=/etc/resolv.conf

I have a custom dict in following format

{ "domain_1" : ["subdomain_1.domain_1.com", "subdomain_2.domain_1.com", "subdomain_3.domain_1.com"],
  "domain_2" : ["subdomain_1.domain_2.com", "subdomain_2.domain_2.com"],
}

Right now the nslookup return following data

#nslookup subdomain_1.domain_1.com 127.0.0.1
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   subdomain_1.domain_1.com
Address: aa.bb.cc.dd
Domain : domain_1.com      # I want to add this in response

I want to add custom field in response named "Domain" which will return parent domain name.

How can I achieve that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.