Repository navigation
03PdnsRecursor
| 01- Network | 02- SambaAD | 03- PdnsRecursor | 04- Settings | 05- Maintenance |
|---|---|---|---|---|
| 06- SecondaryAD | 07- Samba-tool | 08- Selinux | 09- GnomeShell | 10- Troubleshoots |
Pdns-recursor is found in epel-release.
PowerDNS Recursor is a highly efficient,
low-latency DNS caching server that guarantees the right web site
or other online resource is returned in response
to your subscribers' DNS requests as quickly as possible.
I am using pdns-recursor to do the redirect.
Operation:
Pdns-recursor responds to all dns requests on port 4343.
These requests are redirect to another dns server 192.168.90.41.
dnf install epel-release
dnf install pdns-recursor
Warning
The configuration file has changed.
It is in the form of yaml.
It is possible to convert an old recursor.conf (pdns-recursor 4.8.9) configuration file with the command "rec_control show-yaml recursor.conf".
cp /etc/pdns-recursor/recursor.conf /etc/pdns-recursor/recursor.conf_ori
vi /etc/pdns-recursor/recursor.conf
Modify only the lines.
Pay attention to line indentation.
...
##### IP addresses to listen on, separated by spaces or commas. Also accepts ports.
listen:
- 127.0.0.1
...
##### port to listen on
port: 4343
...
######### SECTION recursor #########
recursor:
....
##### Zones for which we forward queries with recursion bit, comma separated domain=ip pairs
forward_zones_recurse:
- zone: .
recurse: true
forwarders:
- 192.168.90.41
##### Sequence of ForwardingCatalogZone
...
systemctl enable --now pdns-recursor
Edit smb.conf to change the DNS redirector.
vi /etc/samba/smb.conf
dns forwarder = 127.0.0.1:4343
systemctl restart samba
nslookup thot.dw.learn.lan
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: thot.dw.learn.lan
Address: 192.168.40.47
nslookup google.fr
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: google.fr
Address: 142.250.179.99
Name: google.fr
Address: 2a00:1450:4007:808::2003