9

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.

Michael
  • 8,362
  • 6
  • 61
  • 88
Swaroop Kundeti
  • 515
  • 4
  • 11
  • 25

1 Answers1

12

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

server=/swaroop.com/ns.swaroop.com
server=/swaroop.org/ns.swaroop.org
Michael
  • 8,362
  • 6
  • 61
  • 88
user4583064
  • 144
  • 1
  • 2
  • 4
    For those of you that found this like me, yes, this applies to wildcards by default. Read about it at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html - look for `--local, --server`. It's about 1/5 of the way down. – onwsk8r Oct 10 '18 at 13:28
  • 3
    Getting dnsmasq: bad address at line 9 of /etc/dnsmasq.conf when added above line – krishna Oct 09 '21 at 09:41