2.1 基本配置
kdc-server | kerberos-node1 | kerberos-node2 | |
操作系统 | CentOS 7 | CentOS 7 | CentOS 7 |
IP地址 | 192.168.2.171 | 192.168.2.172 | 192.168.2.173 |
安装包 | krb5-server krb5-workstation krb5-libs | krb5-workstation krb5-libs | krb5-workstation krb5-libs |
2.2 准备工作
2.2.1 编辑/etc/sysconfig/network-scripts/ifcfg-ens33
vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=“Ethernet”
PROXY_METHOD=“none”
BROWSER_ONLY=“no”
BOOTPROTO=“static”
DEFROUTE=“yes”
IPV4_FAILURE_FATAL=“no”
IPV6INIT=“yes”
IPV6_AUTOCONF=“yes”
IPV6_DEFROUTE=“yes”
IPV6_FAILURE_FATAL=“no”
IPV6_ADDR_GEN_MODE=“stable-privacy”
NAME=“ens33”
UUID=“acadd860-4edf-4da9-947f-0abf74e26f65”
DEVICE=“ens33”
ONBOOT=“yes”
IPADDR=192.168.2.171
NETMASK=255.255.255.0
GATEWAY=192.168.2.2
DNS1=8.8.8.8
DNS2=114.114.114.114
2.2.2 关闭防火墙
#关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
2.2.3 编辑/etc/hosts
192.168.2.171 kdc-server
192.168.2.172 kerberos-node1
192.168.2.173 kerberos-node2
3. kerberos安装流程
3.1 安装kerberos server(节点kdc-server)
#安装krb5-server,krb5-workstation,krb5-libs
yum install -y krb5-server krb5-workstation krb5-libs
#检查
rpm -qa | grep krb5
##打印内容
krb5-server-1.15.1-55.el7_9.x86_64
krb5-libs-1.15.1-55.el7_9.x86_64
krb5-workstation-1.15.1-55.el7_9.x86_64
3.2 安装kerberos client(kerberos-node1,kerberos-node2)
#安装krb5-workstation, krb5-libs
yum install -y krb5-workstation krb5-libs
#检查
rpm -qa | grep krb5
#打印内容
krb5-libs-1.15.1-55.el7_9.x86_64
krb5-workstation-1.15.1-55.el7_9.x86_64
3.3 编辑/var/kerberos/krb5kdc/kdc.conf(节点kdc-server)
加粗部分是需要注意修改的地方
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88[realms]
HADOOP.COM = {
#master_key_type = aes256-cts
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
max_life = 1d
max_renewable_life = 7d
supported_enctypes = aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
}
3.4 编辑/etc/krb5.conf (节点kdc-server,kerberos-node1,kerberos-node2)
Configuration snippets may be placed in this directory as well
includedir /etc/krb5.conf.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log[libdefaults]
dns_lookup_realm = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
default_realm = HADOOP.COM
#default_ccache_name = KEYRING:persistent:%{uid}
udp_preference_limit= 1[realms]
HADOOP.COM = {
kdc = kdc-server
admin_server = kdc-server
}[domain_realm]
.hadoop.com = HADOOP.COM
hadoop.com = HADOOP.COM
3.5 编辑/var/kerberos/krb5kdc/kadm5.acl (节点kdc-server)
*/admin@HADOOP.COM *
4. 启动(节点kdc-server)
#启动krb5kdc
systemctl start krb5kdc
systemctl enable krb5kdc
systemctl is-enabled krb5kdc
#查看krb5kdc服务是否开启
sudo chkconfig --level 35 krb5kdc on
#启动kadmin
systemctl start kadmin
systemctl enable kadmin
systemctl is-enabled kadmin
5. 注册用户实体
#超级用户
kadmin.local -q "addprinc admin/admin"
#普通用户
kadmin.local -q "addprinc abc/abc"
#查看实体
## 最后
**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**
**深知大多数网络安全工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**
**因此收集整理了一份《2024年网络安全全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。**
![img](https://img-blog.csdnimg.cn/img_convert/e8f30731b49583548da792a0584f9ced.png)
![img](https://img-blog.csdnimg.cn/img_convert/32d64dc2843dd8feae7afd33ec3bfe98.png)
![img](https://img-blog.csdnimg.cn/img_convert/457a7efec7c9e75e65dcb0901e8dd4d0.png)
![img](https://img-blog.csdnimg.cn/img_convert/79ac806a9420011acdc1b54820b96aff.png)
![img](https://img-blog.csdnimg.cn/img_convert/92ff16d574e27343c8ef97edbfb7f1bd.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上网络安全知识点!真正的体系化!**
[**如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!**](https://bbs.csdn.net/topics/618653875)
**由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!**
07367)]
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上网络安全知识点!真正的体系化!**
[**如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!**](https://bbs.csdn.net/topics/618653875)
**由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!**