[1] FreeIPA – konfiguracja serwera
5 lutego 2021Skonfigurujemy teraz serwer FreeIPA, który jest częścią zintegrowanego systemu zarządzania bezpieczeństwem. Jeśli posiadasz RHEL to usługa ta nosi nazwę: [Red Hat Identity Management].
[1] Zainstaluj pakiety FreeIPA
[root@vlsr01 ~]# dnf module -y install idm:DL1/dns
2. Skonfiguruj serwer FreeIPA wraz z integrowaną usługą DNS.
# dodaj hosty [root@vlsr01 ~]# mcedit /etc/host 192.168.100.101 vlsr01.zicher.lab vlsr01 192.168.100.102 vlsr02.zicher.lab vlsr02 # skonfiguruj FreeIPA [root@vlsr01 ~]# ipa-server-install --setup-dns The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will set up the IPA Server. Version 4.9.0 This includes: * Configure a stand-alone CA (dogtag) for certificate management * Configure the NTP client (chronyd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure DNS (bind) * Configure the KDC to enable PKINIT To accept the default shown in brackets, press the Enter key. Enter the fully qualified domain name of the computer on which you're setting up server software. Using the form <hostname>.<domainname> Example: master.example.com. Server host name [vlsr01.zicher.lab]: # naciśnij Enter Warning: skipping DNS resolution of host vlsr01.zicher.lab The domain name has been determined based on the host name. Please confirm the domain name [zicher.lab]: # naciśnij Enter The kerberos protocol requires a Realm name to be defined. This is typically the domain name converted to uppercase. Please provide a realm name [ZICHER.LAB]: # naciśnij Enter Certain directory server operations require an administrative user. This user is referred to as the Directory Manager and has full access to the Directory for system management tasks and will be added to the instance of directory server created for IPA. The password must be at least 8 characters long. Directory Manager password: # wpisz hasło Password (confirm): # wpisz hasło The IPA server requires an administrative user, named 'admin'. This user is a regular system account used for IPA server administration. IPA admin password: # wpisz hasło Password (confirm): # wpisz hasło Checking DNS domain zicher.lab., please wait ... Do you want to configure DNS forwarders? [yes]: # wciśnij Enter Following DNS servers are configured in /etc/resolv.conf: 192.168.100.101, 1.1.1.1, 8.8.8.8 Do you want to configure these servers as DNS forwarders? [yes]: # wciśnij Enter All detected DNS servers were added. You can enter additional addresses now: Enter an IP address for a DNS forwarder, or press Enter to skip: # wciśnij Enter DNS forwarders: 192.168.100.101, 1.1.1.1, 8.8.8.8 Checking DNS forwarders, please wait ... Do you want to search for missing reverse zones? [yes]: # wciśnij Enter Reverse record for IP address 192.168.100.101 already exists Do you want to configure chrony with NTP server or pool address? [no]: # wciśnij Enter The IPA Master Server will be configured with: Hostname: vlsr01.zicher.lab IP address(es): 192.168.100.101 Domain name: zicher.lab Realm name: ZICHER.LAB The CA will be configured with: Subject DN: CN=Certificate Authority,O=ZICHER.LAB Subject base: O=ZICHER.LAB Chaining: self-signed BIND DNS server will be configured to serve IPA domain with: Forwarders: 192.168.100.101, 1.1.1.1, 8.8.8.8 Forward policy: only Reverse zone(s): No reverse zone Continue to configure the system with these values? [no]: yes The following operations may take some minutes to complete. Please wait until the prompt is returned. Adding [192.168.100.101 vlsr01.zicher.lab] to your /etc/hosts file Disabled p11-kit-proxy Synchronizing time No SRV records of NTP servers found and no NTP server or pool address was provided. Using default chrony configuration. Attempting to sync time with chronyc. Time synchronization was successful. Configuring directory server (dirsrv). Estimated time: 30 seconds [1/41]: creating directory server instance ============================================================================== Setup complete Next steps: 1. You must make sure these network ports are open: TCP Ports: * 80, 443: HTTP/HTTPS * 389, 636: LDAP/LDAPS * 88, 464: kerberos * 53: bind UDP Ports: * 88, 464: kerberos * 53: bind * 123: ntp 2. You can now obtain a kerberos ticket using the command: 'kinit admin' This ticket will allow you to use the IPA tools (e.g., ipa user-add) and the web user interface. Be sure to back up the CA certificates stored in /root/cacert.p12 These files are required to create replicas. The password for these files is the Directory Manager password The ipa-server-install command was successful
[3] Pobierz bilet/token Kerberos
[root@vlsr01 ~]# kinit admin
Password for admin@ZICHER.LAB: # wpisz hasło
[root@vlsr01 ~]# klist
Ticket cache: KCM:0
Default principal: admin@ZICHER.LAB
Valid starting Expires Service principal
05.02.2021 16:45:55 06.02.2021 16:45:45 krbtgt/ZICHER.LAB@ZICHER.LAB
[4] Jeśli Firewalld pracuje, zezwól na ruch na następujących portach/usługach.
[root@vlsr01 ~]# firewall-cmd --add-service={freeipa-ldap,freeipa-ldaps,dns,ntp} --permanent [root@vlsr01 ~]# firewall-cmd –reload