DNS分離解析技術 yum install bind-chroot systemctl restart named systemctl enable named vim /etc/named.conf vim /etc/named.rfc1912.zones 配置網卡 cd /var/named/ ...
DNS分離解析技術
yum install bind-chroot
systemctl restart named
systemctl enable named
vim /etc/named.conf
vim /etc/named.rfc1912.zones
配置網卡
cd /var/named/
cp -a named.localhost dream.com.china
cp -a named.localhost dream.com.american
vim dream.com.china
vim dream.com.american
客戶端配置
模擬中國用戶功能變數名稱解析
模擬美國用戶解析
DHCP服務配置
yum install dhcp
vim /etc/dhcp/dhcpd.conf
systemctl restart dhcpd
systemctl enable dhcpd
iptables -F
service iptables save
客戶端查看
分配固定IP地址
DHCP服務查看客戶端mac地址和ip
tail /var/log/messages
vim /etc/dhcp/dhcpd.conf (添加第10-13行)
查看客戶端配置結果
部署郵件伺服器(postfix和dovecot)
vim /etc/hostname (修改主機名)
mail.dream.com
yum install bind-chroot (安裝配置DNS)
systemctl restart named
systemctl enable named
vim /etc/named.conf
vim /etc/named.rfc1912.zones
cd /var/named/
cp -a named.localhost dream.com.zone
vim dream.com.zone
systemctl restart named
配置postfix服務程式
yum install postfix
vim /etc/postfix/main.cf
systemctl restart postfix
systemctl enable postfix
useradd xiaoxiao
echo "redhat" | passwd --stdin xiaoxiao
id xiaoxiao (uid=1001(xiaoxiao) gid=1001(xiaoxiao) groups=1001(xiaoxiao))
yum install dovecot (安裝dovecot服務程式)
systemctl restart dovecot
systemctl enable dovecot
vim dovecot.conf (配置主配置文件將24行,註釋去掉;將25行,改為“no”;將48行,改為192.168.100.0/24,允許登錄網段地址)
24 protocols = imap pop3 lmtp
25 disable_plaintext_auth = no
48 login_trusted_networks = 192.168.100.0/24
cd /etc/dovecot
vim 10-mail.conf (配置10-mail.conf 文件)
mail_location = mbox:~/mail:INBOX=/var/mail/%u (去掉註釋行)
systemctl restart dovecot
su - xiaoxiao (登錄xiaoxiao 用戶)
cd ~
mkdir -p /mail/.imap/INBOX (創建郵件目錄)
iptables -F
service iptables save
服務端
客戶端
設置郵箱別名
vim /etc/aliases (配置aliases配置文件)
newaliases (新別名立即生效)