-1

I would like to know if it is possible to create a conditional redirect like:

# all domains *.lan
address=*.lan
server=192.168.1.254

# rest of all
address=
server 8.8.8.8

1 Answers1

1

This is discussed extensively in the documentation. Essentially you have to specify an upstream server using the -S, --local, --server=[/[]/[domain/]][<ipaddr>... syntax.

So something like

--server=/lan/192.0.2.10

would direct all queries for the lan domain to 192.0.2.10 and all other queries to the upstream servers as specified in the /etc/resolv.conf file or elsewhere.

user9517
  • 114,104
  • 20
  • 206
  • 289