DNSMasq forwarding on specific domains

Swaroop Kundeti picture Swaroop Kundeti · Mar 12, 2015 · Viewed 13.5k times · Source

I've a problem of routing DNS traffic on specific domains.

Example:

  • *.swaroop.com should forward to ns.swaroop.com
  • swaroop.org should forward to ns.swaroop.org

Can we achieve the above scenario with DNSMasq? Please let me know if anyone has done this.

Answer

user4583064 picture user4583064 · Mar 12, 2015

The following configuration in /etc/dnsmasq.conf should be useful:

server=/swaroop.com/ns.swaroop.com
server=/swaroop.org/ns.swaroop.org