Centos8 builds nfs based on kdc encryption

Centos8 builds nfs based on kdc encryption

Configuration

1. Kerberos provides a centralized authentication server structure, the authentication server's function is to achieve mutual authentication between users and the servers they access. (Symmetric key encryption technology is used)

2. Kerberos single sign-on principle diagram

3. Service environment

Hostname Virtual machine ip
www.skills.com 192.168.10.222
nfs.skills.com 192.168.10.223
client.skills.com

192.168.10.224

2. Turn off the firewall and download the krb5 software package (main server (www.skills.com)), and add the host name corresponding to the IP in /etc/hosts . (All three nodes need it)

5. Edit the main configuration file (vim /etc/krb5.conf) and change all EXAMPLE.COM in it to your own domain name.

6. Modify /var/kerberos/krb5kdc/kadm5.acl and change EXAMPLE.COM to your own domain name.

[root@www ~]# vim /var/kerberos/krb5kdc/kadm5.acl

7. Initialize the KDC database and enter the database password

[root@www ~]# kdb5_util create -s

8. Restart the service

[root@www ~]# systemctl restart krb5kdc kadmin
[root@www ~]# systemctl enable krb5kdc kadmin

9. Log in to the Kerberos Server service root and log in to kadmin.local without password, create and add a Kerberos user, randomly generate a value as the key of the three-node, and download the key of the main server.

kadmin.local: addprinc root/admin
kadmin.local: addprinc -randkey nfs/www.skills.com
kadmin.local: addprinc -randkey nfs/nfs.skills.com
kadmin.local: addprinc -randkey nfs/client.skills.com
kadmin.local: ktadd nfs/www.skills.com 

You can use listprincs to view the created key

The configuration of the master server is now complete.

nfs server (nfs.skills.com)

1. Download the nfs and kdc installation packages

yum -y install krb5-workstation nfs-utils

2. Edit the main configuration file (vim /etc/krb5.conf) and change all EXAMPLE.COM in it to your own domain name.

3. Log in to the kdc database with the password and download the key (kadmin)

kadmin
ktadd nfs/nfs.skills.com 

4. Create an nfs mount file that requires krb5p encrypted access

mkdir /share 
vim /etc/exports
exportfs -rv

Configuration file content (sec is what encryption method).

5. Restart the service

systemctl restart nfs-server

This completes the configuration.

nfs client (client.skills.com)

1. Because the KDC configuration content of the client and the NFS master server is the same, we can use scp to transfer the configuration file, but we cannot use scp to transfer the configuration file of the master server. Our client does not contain the KDC database, and using the configuration file of the master server will result in an error that the database cannot be found.

2. Download the nfs and kdc installation packages

yum -y install krb5-workstation nfs-utils

3..Log in to the kdc database with password and download key (kadmin)

kadmin
ktadd nfs/client.skills.com 

4. Restart the service, create a folder, mount the share, and finally check it with df.

systemctl restart nfs-server 
mkdir /myshare 
mount 192.168.10.223:/share /share 
df -l 

The kdc-encrypted nfs mount was successful.

This is the end of this article about building kdc-encrypted nfs on Centos8. For more related content about Centos encrypted nfs based on kdc, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Introduction to the process of using NFS remote directory mounting in CentOS environment
  • Complete steps to build NFS file sharing storage service in CentOS 7
  • How to set up NFS file sharing in CentOS 6.8
  • Tutorial on installation and configuration of NFS service under CentOS6.9
  • Centos7 installation and configuration of NFS service and mounting tutorial (recommended)
  • Steps for using and configuring NFS under centos7
  • Introduction to NFS service construction under Centos7

<<:  Example code for css flex layout with automatic line wrapping

>>:  Bootstrap 3.0 study notes page layout

Recommend

WeChat applet development chapter: pitfall record

Recently, I participated in the development of th...

Web developers are concerned about the coexistence of IE7 and IE8

I installed IE8 today. When I went to the Microso...

Table td picture horizontally and vertically centered code

Html code: Copy code The code is as follows: <t...

Implement 24+ array methods in JavaScript by hand

Table of contents 1. Traversal Class 1. forEach 2...

A brief discussion on the correct posture of Tomcat memory configuration

1. Background Although I have read many blogs or ...

jQuery implements the function of adding and deleting employee information

This article shares the specific code of jQuery t...

Pure CSS to achieve cloudy weather icon effect

Effect The effect is as follows ​ Implementation ...

A brief discussion on the placement of script in HTML

I used to think that script could be placed anywh...

Implementation of vue+drf+third-party sliding verification code access

Table of contents 1. Background 2. Verification p...

Detailed explanation of Docker compose orchestration tool

Docker Compose Docker Compose is a tool for defin...

Detailed explanation of how to customize the style of CSS scroll bars

This article introduces the CSS scrollbar selecto...

How to use CURRENT_TIMESTAMP in MySQL

Table of contents Use of CURRENT_TIMESTAMP timest...

Detailed tutorial on installing JDK1.8 on Linux

1. Cleaning before installation rpm -qa | grep jd...

How to install SVN server under Linux

1. Yum installation yum install subversion 2. Con...

View the command to modify the MySQL table structure

Brief description The editor often encounters som...