DNS分离解析 配置DNS的配置文件
vim /etc/named.conf
options {
listen-on port 53 { 192.168.230.128; };
directory "/var/named";
allow-query { "any"; };
};
acl "neiwang" { 192.168.230.130; };//一般用网段
acl "waiwang" { 192.168.230.128; };
view"neiwang"{
match-clients { "neiwang"; };
zone "qq.com" IN {
type master ;
file "qq1.com";
notify yes;
};
};
view"waiwang"{
match-clients { "waiwang"; };
zone "qq.com" IN {
type master ;
file "named.qq.com";
notify yes;
};
};
编辑qq1.com与named.qq.com文件
vim /var/named/named.qq.com
$TTL 1D
@ IN SOA @ admin.admin.com. ( 2020071501 1M 3M 1M 1M )
IN NS dns.qq.com.
dns IN A 192.168.230.128
www IN A 192.168.230.111
aaa IN A 192.168.230.100
bbb IN A 192.168.230.110
vim /var/named/qq1.com
$TTL 1D
@ IN SOA @ admin.admin.com. ( 2020071401 1M 3M 1M 1M )
IN NS dns.qq.com.
dns IN NS 192.168.230.130
www IN A 192.168.230.150
关闭上面两台IP(128,130)主机的防火墙和selinux 开启/重启服务 使用nslookup测试结果 公钥验证 编辑sshd_config文件
vim /etc/ssh/sshd_config
Port 22 #取消注释
#获取密钥
ssh-keygen -t RSA
#发送公钥给另外一台主机
ssh-copy-ip -i 192.168.230.130
结果图(第一次远程连接需要输入密码)
|