====== Instalação do FreeIPA - Marabá ====== === instalação de pacotes === [root@pa-mba-ipa:~]# dnf module list idm [root@pa-mba-ipa:~]# dnf module info idm:DL1 [root@pa-mba-ipa:~]# dnf module enable idm:DL1 [root@pa-mba-ipa:~]# dnf distro-sync [root@pa-mba-ipa:~]# dnf install ipa-server ipa-server-dns [root@pa-mba-ipa:~]# ipa --version VERSION: 4.8.0, API_VERSION: 2.233 ==== Ajustes de rede ==== [root@pa-mba-ipa:~]# nmcli con mod ens192 ipv4.method manual ipv4.addresses 177.75.176.34/27 ipv4.gateway 177.75.176.33 [root@pa-mba-ipa:~]# nmcli con mod ens192 ipv6.method manual ipv6.addresses 2804:694:3000:8000::3/64 ipv6.gateway 2804:694:3000:8000:: [root@pa-mba-ipa:~]# nmcli con mod ens192 ipv4.dns "177.75.176.34" [root@pa-mba-ipa:~]# nmcli con mod ens192 ipv6.dns "2804:694:3000:8000::3" [root@pa-mba-ipa:~]# nmcli connection down ens192 ; nmcli c up ens192 [root@pa-mba-ipa:~]# hostnamectl set-hostname pa-mba-ipa.juntotelecom.com.br [root@pa-mba-ipa:~]# echo "177.75.176.34 pa-mba-ipa.juntotelecom.com.br pa-mba-ipa" | tee -a /etc/hosts [root@pa-mba-ipa:~]# echo "2804:694:3000:8000::3 pa-mba-ipa.juntotelecom.com.br pa-mba-ipa" | tee -a /etc/hosts [root@pa-mba-ipa:~]# ip a show ens192 | egrep 'inet' inet 177.75.176.34/27 brd 177.75.176.63 scope global noprefixroute ens192 inet6 2804:694:3000:8000::3/64 scope global noprefixroute [root@pa-mba-ipa:~]# cat /etc/resolv.conf # Generated by NetworkManager search juntotelecom.com.br nameserver 177.75.176.34 nameserver 2804:694:3000:8000::3 [root@pa-mba-ipa:~]# hostname -f pa-mba-ipa.juntotelecom.com.br [root@pa-mba-ipa:~]# cat /etc/hosts | egrep 'ipa' 177.75.176.34 pa-mba-ipa.juntotelecom.com.br pa-mba-ipa 2804:694:3000:8000::3 pa-mba-ipa.juntotelecom.com.br pa-mba-ipa ===== Instalação do ipa-server ===== [root@pa-mba-ipa:~]# ipa-server-install --setup-dns --mkhomedir 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.8.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 . Example: master.example.com. Server host name [pa-mba-ipa.juntotelecom.com.br]: Warning: skipping DNS resolution of host pa-mba-ipa.juntotelecom.com.br The domain name has been determined based on the host name. Please confirm the domain name [juntotelecom.com.br]: The kerberos protocol requires a Realm name to be defined. This is typically the domain name converted to uppercase. Please provide a realm name [JUNTOTELECOM.COM.BR]: 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: Password (confirm): The IPA server requires an administrative user, named 'admin'. This user is a regular system account used for IPA server administration. IPA admin password: Password (confirm): Checking DNS domain juntotelecom.com.br., please wait ... DNS check for domain juntotelecom.com.br. failed: The DNS operation timed out after 30.00095772743225 seconds. Do you want to configure DNS forwarders? [yes]: no No DNS forwarders configured Do you want to search for missing reverse zones? [yes]: Checking DNS domain 176.75.177.in-addr.arpa., please wait ... Reverse zone 176.75.177.in-addr.arpa. for IP address 177.75.176.34 already exists Checking DNS domain 0.0.0.8.0.0.0.3.4.9.6.0.4.0.8.2.ip6.arpa., please wait ... Reverse zone 0.0.0.8.0.0.0.3.4.9.6.0.4.0.8.2.ip6.arpa. for IP address 2804:694:3000:8000::3 already exists Do you want to configure chrony with NTP server or pool address? [no]: yes Enter NTP source server addresses separated by comma, or press Enter to skip: a.st1.ntp.br, a.ntp.br, gps.ntp.br Enter a NTP source pool address, or press Enter to skip: The IPA Master Server will be configured with: Hostname: pa-mba-ipa.juntotelecom.com.br IP address(es): 177.75.176.34, 2804:694:3000:8000::3 Domain name: juntotelecom.com.br Realm name: JUNTOTELECOM.COM.BR The CA will be configured with: Subject DN: CN=Certificate Authority,O=JUNTOTELECOM.COM.BR Subject base: O=JUNTOTELECOM.COM.BR Chaining: self-signed BIND DNS server will be configured to serve IPA domain with: Forwarders: No forwarders Forward policy: first Reverse zone(s): No reverse zone NTP server: a.st1.ntp.br NTP server: a.ntp.br NTP server: gps.ntp.br 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. Disabled p11-kit-proxy Synchronizing time Configuration of chrony was changed by installer. Attempting to sync time with chronyc. Process chronyc waitsync failed to sync time! Unable to sync time with chrony server, assuming the time is in sync. Please check that 123 UDP port is opened, and any time server is on network. Warning: IPA was unable to sync time with chrony! Time synchronization is required for IPA to work correctly Configuring directory server (dirsrv). Estimated time: 30 seconds [1/44]: creating directory server instance Starting installation... Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv@JUNTOTELECOM-COM-BR.service → /usr/lib/systemd/system/dirsrv@.service. Opening SELinux policy "//etc/selinux/targeted/policy/policy.31" Successfully opened SELinux policy "//etc/selinux/targeted/policy/policy.31" Allocate local instance with ldapi://%2fvar%2frun%2fslapd-JUNTOTELECOM-COM-BR.socket [2/44]: configure autobind for root [3/44]: stopping directory server [4/44]: updating configuration in dse.ldif [5/44]: starting directory server [6/44]: adding default schema [7/44]: enabling memberof plugin [8/44]: enabling winsync plugin [9/44]: configure password logging [10/44]: configuring replication version plugin [11/44]: enabling IPA enrollment plugin [12/44]: configuring uniqueness plugin [13/44]: configuring uuid plugin [14/44]: configuring modrdn plugin [15/44]: configuring DNS plugin [16/44]: enabling entryUSN plugin [17/44]: configuring lockout plugin [18/44]: configuring topology plugin [19/44]: creating indices [20/44]: enabling referential integrity plugin [21/44]: configuring certmap.conf [22/44]: configure new location for managed entries [23/44]: configure dirsrv ccache and keytab [24/44]: enabling SASL mapping fallback [25/44]: restarting directory server [26/44]: adding sasl mappings to the directory [27/44]: adding default layout [28/44]: adding delegation layout [29/44]: creating container for managed entries [30/44]: configuring user private groups [31/44]: configuring netgroups from hostgroups [32/44]: creating default Sudo bind user [33/44]: creating default Auto Member layout [34/44]: adding range check plugin [35/44]: creating default HBAC rule allow_all [36/44]: adding entries for topology management [37/44]: initializing group membership [38/44]: adding master entry [39/44]: initializing domain level [40/44]: configuring Posix uid/gid generation [41/44]: adding replication acis [42/44]: activating sidgen plugin [43/44]: activating extdom plugin [44/44]: configuring directory to start on boot Done configuring directory server (dirsrv). Configuring Kerberos KDC (krb5kdc) [1/10]: adding kerberos container to the directory [2/10]: configuring KDC [3/10]: initialize kerberos container [4/10]: adding default ACIs [5/10]: creating a keytab for the directory [6/10]: creating a keytab for the machine [7/10]: adding the password extension to the directory [8/10]: creating anonymous principal [9/10]: starting the KDC [10/10]: configuring KDC to start on boot Done configuring Kerberos KDC (krb5kdc). Configuring kadmin [1/2]: starting kadmin [2/2]: configuring kadmin to start on boot Done configuring kadmin. Configuring ipa-custodia [1/5]: Making sure custodia container exists [2/5]: Generating ipa-custodia config file [3/5]: Generating ipa-custodia keys [4/5]: starting ipa-custodia [5/5]: configuring ipa-custodia to start on boot Done configuring ipa-custodia. Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes [1/30]: configuring certificate server instance [2/30]: Add ipa-pki-wait-running [3/30]: reindex attributes [4/30]: exporting Dogtag certificate store pin [5/30]: stopping certificate server instance to update CS.cfg [6/30]: backing up CS.cfg [7/30]: disabling nonces [8/30]: set up CRL publishing [9/30]: enable PKIX certificate path discovery and validation [10/30]: starting certificate server instance [11/30]: configure certmonger for renewals [12/30]: requesting RA certificate from CA [13/30]: setting audit signing renewal to 2 years [14/30]: restarting certificate server [15/30]: publishing the CA certificate [16/30]: adding RA agent as a trusted user [17/30]: authorizing RA to modify profiles [18/30]: authorizing RA to manage lightweight CAs [19/30]: Ensure lightweight CAs container exists [20/30]: configure certificate renewals [21/30]: configure Server-Cert certificate renewal [22/30]: Configure HTTP to proxy connections [23/30]: restarting certificate server [24/30]: updating IPA configuration [25/30]: enabling CA instance [26/30]: migrating certificate profiles to LDAP [27/30]: importing IPA certificate profiles [28/30]: adding default CA ACL [29/30]: adding 'ipa' CA entry [30/30]: configuring certmonger renewal for lightweight CAs Done configuring certificate server (pki-tomcatd). Configuring directory server (dirsrv) [1/3]: configuring TLS for DS instance [2/3]: adding CA certificate entry [3/3]: restarting directory server Done configuring directory server (dirsrv). Configuring ipa-otpd [1/2]: starting ipa-otpd [2/2]: configuring ipa-otpd to start on boot Done configuring ipa-otpd. Configuring the web interface (httpd) [1/21]: stopping httpd [2/21]: backing up ssl.conf [3/21]: disabling nss.conf [4/21]: configuring mod_ssl certificate paths [5/21]: setting mod_ssl protocol list [6/21]: configuring mod_ssl log directory [7/21]: disabling mod_ssl OCSP [8/21]: adding URL rewriting rules [9/21]: configuring httpd Nothing to do for configure_httpd_wsgi_conf [10/21]: setting up httpd keytab [11/21]: configuring Gssproxy [12/21]: setting up ssl [13/21]: configure certmonger for renewals [14/21]: publish CA cert [15/21]: clean up any existing httpd ccaches [16/21]: configuring SELinux for httpd [17/21]: create KDC proxy config [18/21]: enable KDC proxy [19/21]: starting httpd [20/21]: configuring httpd to start on boot [21/21]: enabling oddjobd Done configuring the web interface (httpd). Configuring Kerberos KDC (krb5kdc) [1/1]: installing X509 Certificate for PKINIT Done configuring Kerberos KDC (krb5kdc). Applying LDAP updates Upgrading IPA:. Estimated time: 1 minute 30 seconds [1/10]: stopping directory server [2/10]: saving configuration [3/10]: disabling listeners [4/10]: enabling DS global lock [5/10]: disabling Schema Compat [6/10]: starting directory server [7/10]: upgrading server [8/10]: stopping directory server [9/10]: restoring configuration [10/10]: starting directory server Done. Restarting the KDC Configuring DNS (named) [1/11]: generating rndc key file [2/11]: adding DNS container [3/11]: setting up our zone [4/11]: setting up our own record [5/11]: setting up records for other masters [6/11]: adding NS record to the zones [7/11]: setting up kerberos principal [8/11]: setting up named.conf [9/11]: setting up server configuration [10/11]: configuring named to start on boot [11/11]: changing resolv.conf to point to ourselves Done configuring DNS (named). Restarting the web server to pick up resolv.conf changes Configuring DNS key synchronization service (ipa-dnskeysyncd) [1/7]: checking status [2/7]: setting up bind-dyndb-ldap working directory [3/7]: setting up kerberos principal [4/7]: setting up SoftHSM [5/7]: adding DNSSEC containers [6/7]: creating replica keys [7/7]: configuring ipa-dnskeysyncd to start on boot Done configuring DNS key synchronization service (ipa-dnskeysyncd). Restarting ipa-dnskeysyncd Restarting named Updating DNS system records Configuring client side components This program will set up IPA client. Version 4.8.0 Using existing certificate '/etc/ipa/ca.crt'. Client hostname: pa-mba-ipa.juntotelecom.com.br Realm: JUNTOTELECOM.COM.BR DNS Domain: juntotelecom.com.br IPA Server: pa-mba-ipa.juntotelecom.com.br BaseDN: dc=juntotelecom,dc=com,dc=br Configured sudoers in /etc/authselect/user-nsswitch.conf Configured /etc/sssd/sssd.conf Systemwide CA database updated. Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub WARNING: The configuration pre-client installation is not managed by authselect and cannot be backed up. Uninstallation may not be able to revert to the original state. SSSD enabled Configured /etc/openldap/ldap.conf Configured /etc/ssh/ssh_config Configured /etc/ssh/sshd_config Configuring juntotelecom.com.br as NIS domain. Client configuration complete. The ipa-client-install command was successful ============================================================================== 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 ==== Check pós instalação ==== [root@pa-mba-ipa:~]# klist klist: Credentials cache 'KCM:0' not found [root@pa-mba-ipa:~]# kinit admin Password for admin@JUNTOTELECOM.COM.BR: [root@pa-mba-ipa:~]# klist Ticket cache: KCM:0 Default principal: admin@JUNTOTELECOM.COM.BR Valid starting Expires Service principal 05/06/20 16:16:05 05/07/20 16:15:58 krbtgt/JUNTOTELECOM.COM.BR@JUNTOTELECOM.COM.BR [root@pa-mba-ipa:~]# ipa config-mod --defaultshell=/bin/bash Maximum username length: 32 Maximum hostname length: 64 Home directory base: /home Default shell: /bin/bash Default users group: ipausers Default e-mail domain: juntotelecom.com.br Search time limit: 2 Search size limit: 100 User search fields: uid,givenname,sn,telephonenumber,ou,title Group search fields: cn,description Enable migration mode: FALSE Certificate Subject base: O=JUNTOTELECOM.COM.BR Password Expiration Notification (days): 4 Password plugin features: AllowNThash, KDC:Disable Last Success SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$sysadm_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023 Default SELinux user: unconfined_u:s0-s0:c0.c1023 Default PAC types: MS-PAC, nfs:NONE IPA masters: pa-mba-ipa.juntotelecom.com.br, sp-spo-ipa.juntotelecom.com.br IPA master capable of PKINIT: pa-mba-ipa.juntotelecom.com.br, sp-spo-ipa.juntotelecom.com.br IPA CA servers: pa-mba-ipa.juntotelecom.com.br, sp-spo-ipa.juntotelecom.com.br IPA CA renewal master: pa-mba-ipa.juntotelecom.com.br IPA DNS servers: pa-mba-ipa.juntotelecom.com.br, sp-spo-ipa.juntotelecom.com.br [root@pa-mba-ipa:~]# ipactl status Directory Service: RUNNING krb5kdc Service: RUNNING kadmin Service: RUNNING named Service: RUNNING httpd Service: RUNNING ipa-custodia Service: RUNNING pki-tomcatd Service: RUNNING ipa-otpd Service: RUNNING ipa-dnskeysyncd Service: RUNNING ipa: INFO: The ipactl command was successful [root@pa-mba-ipa:~]# ipa config-show Maximum username length: 32 Maximum hostname length: 64 Home directory base: /home Default shell: /bin/sh Default users group: ipausers Default e-mail domain: juntotelecom.com.br Search time limit: 2 Search size limit: 100 User search fields: uid,givenname,sn,telephonenumber,ou,title Group search fields: cn,description Enable migration mode: FALSE Certificate Subject base: O=JUNTOTELECOM.COM.BR Password Expiration Notification (days): 4 Password plugin features: AllowNThash, KDC:Disable Last Success SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$sysadm_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023 Default SELinux user: unconfined_u:s0-s0:c0.c1023 Default PAC types: MS-PAC, nfs:NONE IPA masters: pa-mba-ipa.juntotelecom.com.br IPA master capable of PKINIT: pa-mba-ipa.juntotelecom.com.br IPA CA servers: pa-mba-ipa.juntotelecom.com.br IPA CA renewal master: pa-mba-ipa.juntotelecom.com.br IPA DNS servers: pa-mba-ipa.juntotelecom.com.br ==== Check NTP ==== [root@pa-mba-ipa:~]# chronyc -4 sources 210 Number of sources = 3 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^+ a.st1.ntp.br 1 6 377 51 -77us[ -77us] +/- 19ms ^+ a.ntp.br 2 6 377 62 -23us[ -19us] +/- 21ms ^* gps.jd.ntp.br 1 6 377 62 +15us[ +19us] +/- 19ms [root@pa-mba-ipa:~]# chronyc sources -v 210 Number of sources = 3 .-- Source mode '^' = server, '=' = peer, '#' = local clock. / .- Source state '*' = current synced, '+' = combined , '-' = not combined, | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable. || .- xxxx [ yyyy ] +/- zzzz || Reachability register (octal) -. | xxxx = adjusted offset, || Log2(Polling interval) --. | | yyyy = measured offset, || \ | | zzzz = estimated error. || | | \ MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^+ a.st1.ntp.br 1 6 377 2 -118us[ -118us] +/- 19ms ^+ a.ntp.br 2 6 377 3 -155us[ -155us] +/- 21ms ^* gps.jd.ntp.br 1 6 377 3 -30us[ -27us] +/- 20ms [root@pa-mba-ipa:~]# chronyc -4 tracking Reference ID : 427DF641 (gps.jd.ntp.br) Stratum : 2 Ref time (UTC) : Wed May 06 19:22:00 2020 System time : 0.000009967 seconds fast of NTP time Last offset : +0.000002833 seconds RMS offset : 0.000054069 seconds Frequency : 6.475 ppm slow Residual freq : -0.004 ppm Skew : 0.341 ppm Root delay : 0.036492769 seconds Root dispersion : 0.001275121 seconds Update interval : 64.3 seconds Leap status : Normal [root@pa-mba-ipa:~]# chronyc sourcestats 210 Number of sources = 3 Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev ============================================================================== a.st1.ntp.br 13 8 590 +0.032 0.305 +58us 40us a.ntp.br 8 4 454 +0.102 1.155 -17us 64us gps.jd.ntp.br 13 7 590 -0.099 0.389 +32us 46us ==== Check DNS ==== [root@pa-mba-ipa:~]# ipa dnszone-show juntotelecom.com.br Zone name: juntotelecom.com.br. Active zone: TRUE Authoritative nameserver: pa-mba-ipa.juntotelecom.com.br. Administrator e-mail address: hostmaster.juntotelecom.com.br. SOA serial: 1588792353 SOA refresh: 3600 SOA retry: 900 SOA expire: 1209600 SOA minimum: 3600 Allow query: any; Allow transfer: none; [root@pa-mba-ipa:~]# ipa dnszone-find juntotelecom.com.br Zone name: juntotelecom.com.br. Active zone: TRUE Authoritative nameserver: pa-mba-ipa.juntotelecom.com.br. Administrator e-mail address: hostmaster.juntotelecom.com.br. SOA serial: 1588792353 SOA refresh: 3600 SOA retry: 900 SOA expire: 1209600 SOA minimum: 3600 Allow query: any; Allow transfer: none; ---------------------------- Number of entries returned 1 ---------------------------- [root@pa-mba-ipa:~]# ipa dnsconfig-show --------------------------------- Global DNS configuration is empty --------------------------------- IPA DNS servers: pa-mba-ipa.juntotelecom.com.br ===== Regras de firewall ===== [root@pa-mba-ipa:~]# firewall-cmd --permanent --add-service={freeipa-4,dns,ntp} success [root@pa-mba-ipa:~]# firewall-cmd --reload success [root@pa-mba-ipa:~]# cat /usr/lib/firewalld/services/freeipa-4.xml FreeIPA 4 server FreeIPA is an integrated identity and authentication solution with Kerberos, LDAP, PKI, and web UI. Enable this option if you plan to provide a FreeIPA server. Enable the 'dns' service if this FreeIPA server provides DNS services, 'ntp' service if this FreeIPA server provides NTP services, and 'freeipa-trust' for cross-forest trusts with Active Directory. [root@pa-mba-ipa:~]# firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: ens192 sources: services: cockpit dhcpv6-client dns freeipa-4 ntp ssh ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: