拓扑图
拓扑介绍
https服务器由dhcp服务发地址送指定地址
dns负责解析https
HTTPS服务配置
/etc/httpd/conf.d/host.conf
<VirtualHost 172.24.8.100:443>
DocumentRoot "/www/openlab"
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile /etc/pki/tls/certs/jiami.crt
SSLCertificateKeyFile /etc/pki/tls/certs/jiami.key
servername www.openlab.com
alias /mimi /usr/local/mysecret
</ VirtualHost>
<directory /www/openlab>
authtype basic
authname "openlab"
authuserfile /etc/httpd/mymima
require user jack tom
</ directory>
<directory /usr/local/mysecret>
authtype basic
authname "openlab"
authuserfile /etc/httpd/mymima
require user rose
</ directory>
[root@www ~]# cat /www/openlab/index.html
welcome to openlab
[root@www ~]# cat /usr/local/mysecret/index.html
this isopenlabde mimi
DNS服务配置
options {
listen-on port 53 { 172.24.8.40; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "openlab.com" IN {
type master;
file "x.com";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
/var/named/x.com内容
$TTL 1D
@ IN SOA @ admin.openlab.com. ( 0 1D 1H 1W 3H )
IN NS ns.opelab.com.
IN MX 715 mail.openlab.com.
ns IN A 172.24.8.100
www IN A 172.24.8.100
DHCP服务配置
/etc/dhpc/dhcpd.conf
ddns-update-style none;
ignore client-updates;
default-lease-time 2000;
max-lease-time 5000;
option routers 172.24.8.1;
option domain-name-servers 172.24.8.40;
subnet 172.24.8.0 netmask 255.255.255.0{
range 172.24.8.20 172.24.8.30;
}
host dns{
hardware ethernet 00:0c:29:27:00:4c;
fixed-address 172.24.8.100;
}
需要的安装包
https: httpd , mod_ssl
dhcp: dhcp
dns: named
本实验关闭防火墙和selinux简单易作
systemctl stop firewalld
setenforce 0
实验使用系统为redhat 7.0版本
测试结果
HTTPS端
DHCP配置验证
DNS配置验证
HTTPS服务验证