debian:pdns_recursor

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Порівняння попередніх версій Попередня ревізія
Наступна ревізія
Попередня ревізія
debian:pdns_recursor [07/10/2022 23:33] Methoddebian:pdns_recursor [07/03/2023 09:47] (поточний) Method
Рядок 1: Рядок 1:
-====== PowerDNS Recursor ======+====== PowerDNS  Recursor ======
  
 Розгортаємо високопродуктивний безкоштовний DNS-сервер Розгортаємо високопродуктивний безкоштовний DNS-сервер
Рядок 8: Рядок 8:
 All we do from sudo user!!! All we do from sudo user!!!
  
-Після будь-якого повідомлення, до команди "sudo su" and retype your password!+"sudo su"!
 </WRAP> </WRAP>
  
-[[https://repo.powerdns.com/]]+В репозиторіях є зазвичай, застаріла версія, тому заглянемо на сайт [[https://repo.powerdns.com/]] 
 + 
 +Там знаходимо стабільну версію програми і застосовуємо зміни в списку репозиторіїв 
 + 
 +<code bash> 
 +sh -c 'echo "deb [arch=amd64] http://repo.powerdns.com/debian bullseye-rec-47 main" > /etc/apt/sources.list.d/pdns.list' 
 +</code> 
 + 
 +<code bash> 
 +tee /etc/apt/preferences.d/pdns<<EOF 
 +Package: pdns-* 
 +Pin: origin repo.powerdns.com 
 +Pin-Priority: 600 
 +EOF 
 +</code> 
 + 
 +<code bash> 
 +curl https://repo.powerdns.com/FD380FBB-pub.asc | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/powerdns.gpg --import 
 +chmod 644 /etc/apt/trusted.gpg.d/
 +</code>
  
 <code bash> <code bash>
 apt-get update apt-get update
 apt-get install -y pdns-recursor apt-get install -y pdns-recursor
-nano /etc/powerdns/recursor.conf+cp -r /etc/powerdns/ /etc/powerdns.orig/
 </code> </code>
  
 <code bash> <code bash>
 +tee /etc/powerdns/recursor.conf<<EOF
 setgid=pdns setgid=pdns
 setuid=pdns setuid=pdns
Рядок 26: Рядок 46:
 quiet=yes quiet=yes
 security-poll-suffix= security-poll-suffix=
 +EOF
 </code> </code>
  
Рядок 49: Рядок 70:
 </code> </code>
  
 +Далі необхідно налашувати переадресацію запитів DNS на авторитарні сервери, які безпосередньо тримають зони доменів.
 +
 +Тут можна піти двома шляхами на вибір:
 +  * Перший і правильніший - налаштувати зв'язок з кореневими DNS серверами
 <code bash> <code bash>
 cd /etc/powerdns/ cd /etc/powerdns/
Рядок 57: Рядок 82:
 mv /etc/resolv.conf /etc/resolv.old.conf mv /etc/resolv.conf /etc/resolv.old.conf
 echo "nameserver 127.0.0.1" > /etc/resolv.conf echo "nameserver 127.0.0.1" > /etc/resolv.conf
 +echo "hint-file=/etc/powerdns/root.zone" >> /etc/powerdns/recursor.conf
 systemctl restart pdns-recursor systemctl restart pdns-recursor
 </code> </code>
  
 +  * Другий простіший, але менш продуктивний - переадресувати запити на інші DNS рекурсори, наприклад Cloudflare та Google
 <code bash> <code bash>
 echo "forward-zones-recurse=.=1.1.1.1;1.0.0.1;8.8.8.8;8.8.4.4;" > /etc/powerdns/recursor.d/forward-zones-recurse.conf echo "forward-zones-recurse=.=1.1.1.1;1.0.0.1;8.8.8.8;8.8.4.4;" > /etc/powerdns/recursor.d/forward-zones-recurse.conf
Рядок 65: Рядок 92:
  
 <code bash> <code bash>
-systemctl start pdns-recursor+chown -R pdns:root /etc/powerdns/ 
 +systemctl restart pdns-recursor
 netstat -tap | grep pdns netstat -tap | grep pdns
 </code> </code>
  • debian/pdns_recursor.1665185600.txt.gz
  • Востаннє змінено: 07/10/2022 23:33
  • повз Method