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 (新别名立即生效)