hostname yndx-dns
# Задание - 1
//1.1 Отключить systemd-resolved
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
sudo rm -f /etc/resolv.conf
echo "nameserver 127.0.0.1" | sudo tee /etc/resolv.conf
//1.2 Установка и настройка dnsmasq (DNS)
sudo apt update
sudo apt install -y dnsmasq
//Редактируем /etc/dnsmasq.conf:
sudo nano /etc/dnsmasq.conf
# <Config
domain=practicumsuperstore.ru
local=/practicumsuperstore.ru/
address=/WEB.practicumsuperstore.ru/10.10.1.200
address=/AD.practicumsuperstore.ru/10.10.1.201
address=/FS.practicumsuperstore.ru/10.10.1.202
listen-address=127.0.0.1
listen-address=10.10.1.200
bind-interfaces
server=8.8.8.8
server=1.1.1.1
# Config>
sudo systemctl restart dnsmasq
sudo systemctl enable dnsmasq
1.3 Настройка часового пояса (Москва, UTC+3)
sudo timedatectl set-timezone Europe/Moscow
//1.4 Установка и настройка NTP (chrony) на Хосте 1
sudo apt install -y chrony
sudo nano /etc/chrony/chrony.conf
# <Config
server 0.ru.pool.ntp.org iburst
server 1.ru.pool.ntp.org iburst
server 2.ru.pool.ntp.org iburst
allow 10.10.1.0/24
local stratum 10
sudo systemctl restart chrony
sudo systemctl enable chrony
# Config>
chronyc tracking
chronyc sources -v
-----------------------------------------------------------------
# Задание - 3
Добавь в /etc/dnsmasq.conf:
address=/mail.practicumsuperstore.ru/10.10.1.200
# MX-запись (важно!)
mx-host=practicumsuperstore.ru,mail.practicumsuperstore.ru,10
sudo systemctl restart dnsmasq
sudo apt update
sudo apt install -y postfix mailutils net-tools
sudo nano /etc/postfix/main.cf
# <Config
myhostname = mail.practicumsuperstore.ru
mydomain = practicumsuperstore.ru
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
# Config>
home_mailbox = Maildir/
tail -n 10 /var/log/mail.log
ls -la /home/ubuntu/Maildir/new
cd /home/ubuntu/Maildir/new/
ls -la
less 1763836343.V802Ic0021M156897.yndx-dns
