303PdnsRecursor - amagerard/FreeRadius GitHub Wiki

HOME

RedHat/SambaAd

01- Synoptic 02- SambaAD 03- PdnsRecursor 04- Settings
05- Maintenance 06- Selinux 07- GnomeShell
FreeRadius DaloRadius OpenLdap

3. Pdns-Recursor.

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.

3.1 Principle.

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.

3.2 Installation.

dnf install pdns-recursor
systemctl enable pdns-recursor

3.3 Pdns-recursor.

vi /etc/pdns-recursor/recursor.conf

Put the redirection dns server (here 1.1.1.1).

# forward-zones-recurse Zones for which we forward queries with recursion bit, comma  
forward-zones-recurse=.=1.1.1.1  

Put the IP of the locahost SambaAD server.

# local-address IP addresses to listen on, separated by spaces or commas.#  
local-address=127.0.0.1  

Pdns-recursor listening port 4343.
The Samba-AD server redirects all the DNS requests which are not from its domain to port 4343.

# local-port   port to listen on  
local-port=4343  

systemctl enable --now pdns-recursor

3.4 Modify samba.

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