Category Archives: Open Source

Install Elasticsearch, Logstash, Kibana di CentOS 7

 

Update system terlebih dahulu sebelum melakukan installasi di server

[1] Install Java + Net tools

yum -y install java-1.8.0 net-tools
java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

[2] Konfigurasi Elasticsearch

Import key Elasticsearch

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Tambahkan Repository Elastic

vi /etc/yum.repos.d/elastic.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Install Elasticsearch

yum install -y elasticsearch
systemctl daemon-reload
systemctl enable elasticsearch
systemctl start elasticsearch

Gunakan fitur curl untuk mengecek apakah elasticsearch mendapat respon query atau tidak

curl -X GET http://localhost:9200

{
"name" : "wD5fLEi",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "ySnCUidpSc22GMhhDhVUbA",
"version" : {
"number" : "6.8.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "1fad4e1",
"build_date" : "2019-06-18T13:16:52.517138Z",
"build_snapshot" : false,
"lucene_version" : "7.7.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}

[3] Install Logstash

yum -y install logstash

Konfigurasi Logstash

vi /etc/logstash/conf.d/logstash.conf
#OK tambahkan Script Seperti di bawah ini

input {
beats {
port => 5044

# Set False Jika tidak mengaktifkan fitur SSL 
ssl => false

# Beri pagar jika tidak mengaktifkan fitur SSL
#ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
#ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
}
}

filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGLINE}" }
}

date {
match => [ "timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}

}

output {
elasticsearch {
hosts => localhost
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
}
stdout {
codec => rubydebug
}
}

Lakukan start service

systemctl start logstash
systemctl enable logstash

Jika akan melakukan troubleshoot bisa langsung mengakses log nya

 cat /var/log/logstash/logstash-plain.log

[4] Install Kibana

yum -y install kibana

Ubah konfigurasi kibana di vi /etc/kibana/kibana.yml, ubah server host menjadi IP server, jika ingin menggunakan hostname bisa menambahkan domain name

server.host: "10.1.16.162"
elasticsearch.hosts: "http://localhost:9200"

Lakukan start service kibana

systemctl start kibana
systemctl enable kibana

[5] Install dan Konfigurasi Filebeat

Tambahkan repository filebeat vi /etc/yum.repos.d/filebeat.repo

[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Install Filebeat

 yum install filebeat -y

Konfig DNS name server hosts, vi /etc/hosts

10.167.16.162 logmgt.lottemart.co.id logmgt

Ubah konfigurasi yang ada di Filebeat, vi /etc/filebeat/filebeat.yml, jika memakai IP atau Hostname bisa langsung tambahkan.

output.logstash:
# The Logstash hosts
hosts: ["localhost:5044"]

Uncomment untuk line elasticsearch

#output.elasticsearch:
# Array of hosts to connect to.
# hosts: ["localhost:9200"]

Enable module filebeat terlebih dahulu biar lebih Ngeten

[root@localhost ~]# filebeat modules enable system

Enabled system
[root@localhost ~]# filebeat modules list
Enabled:
system

Disabled:
apache2
auditd
elasticsearch
haproxy
icinga
iis
iptables
kafka
kibana
logstash
mongodb
mysql
nginx
osquery
postgresql
redis
suricata
traefik

Load Template menggunakan command seperti di bawah ini

[root@localhost ~]# filebeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'

Loaded index template

Load dashboard logstash (enabled), di bawah ini adalah cara menampilakan output dan mengaktifkan Elasticsearch :

[root@localhost ~]# filebeat setup -e -E output.logstash.enabled=false -E output.elasticsearch.hosts=['localhost:9200'] -E setup.kibana.host=localhost:5601

Untuk melakukan verifikasi Elasticsearch menerima data yang benar maka jalankan query Filebeat dengan command seperti di bawah ini

[root@localhost ~]# curl -X GET 'http://localhost:9200/filebeat-*/_search?pretty'

Step terakhir lakukan start service Filebeat

systemctl start filebeat
systemctl enable filebeat

[6] Buka Dashboard : http://IP_Server:5601/

Setting Filebeat log terlebih dahulu : Pilih Step 1, masukkan filebeat maka akan muncul log hari ini

Next Step pilih timestamp – lalu pilih create index pattern

Setelah selesai akan muncul tampilan seperti di bawah ini

Sekarang bisa klik Discover maka akan muncul tampilan seperti di bawah ini

Cheers

Advertisements

TacacsGUI

TacacsGUI is free access control server for you network devices.

TacacsGUI adalah open source Access Control Server untuk autentikasi perangkat jaringan atau security melalui server tacacs.

[1] Download TacacsGUIĀ  di website resminya ada disni

[2] Lakukan import OVA TacacsGUI, setelah selesai import OVA, login ke server TacacsGUI dengan menggunakan user tacgui, password tacgui.

[3] Setting IP address untuk server tacacs

vi /etc/netplan/01-netcfg.yaml
network:
ethernets:
ens160:
addresses: [10.10.10.10/24]
dhcp4: 'no'
dhcp6: 'no'
gateway4: 10.10.10.1
nameservers:
addresses: ["DNS_Server"]
renderer: networkd
version: 2

[4] Masuk ke Portal TacacsGUI https://10.10.10.10:4443, untuk login nya bisa menggunakan username dan password tacgui

[5] Tahap awal setelah login seharusnya adalah melakukan konfigurasi antara TacacsGUI dengan Device yang akan menjadi target. Masuk ke menu Tacacs Devices – Devices – Add Device

Setelah selesai jangan lupa untuk klik apply

Masukkan ke device list – add device

Untuk TacGUI pilih Device yang sudah di tambahkan di menu Devices

[6] Setting waktu/zone

[7] Mavis Module – Auth LDAP

Tes koneksi LDAP, jika sukses akan muncul seperti di atas

[8] Menambahkan user tacacs – Add user

Banyak fitur pembuatan user ini, bisa di buat untuk grouping, membuat akses list service, akses rule.

Cheers

Webmin

Webmin adalah tools konfigurasi untuk sistem server berbasis web. Di webmin kita dapat memonitor kapasitas memory server atau melihat log internal server dan masih banyak lagi tentang kebutuhan sistem administrator.

[1] Install Webmin dan paket paket yang di perlukan

yum -y install perl-Net-SSLeay
yum -y install http://download.webmin.com/download/yum/webmin-1.900-1.noarch.rpm

Disini bisa memilih versi untuk webmin bisa langsung berkunjung ke situsnya untuk download = webmin

[2] Setelah terinstall lalu masukkan ip yang diijinkan mengakses webmin, tambahkan di paling bawah

vi /etc/webmin/miniserv.conf

allow=127.0.0.1 192.168.10.10/32

Lakukan restart service

/etc/rc.d/init.d/webmin restart

[3] Open akses browser webmin, https://192.168.10.10:10000 , login mengguakan user root dan password root

Cheers

Install dan konfigurasi LogAnalyzer 4

[1] Update System server terlebih dahulu

yum -y update

[2] Install packet yang di butuhkan oleh loganalyzer

yum install httpd php php-mysql wget -y

enable service untuk httpd

systemctl enable httpd && systemctl start httpd

Install mariadb server dan rsyslog-mysql

yum install mariadb-server rsyslog-mysql -y
systemctl enable mariadb && systemctl start mariadb
mysql_secure_installation

[3] Konfigurasi database rsyslog

mysql -u root -p < /usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql 
Enter password:

Membuat user database untuk akses Syslog database

mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT ALL ON Syslog.* TO 'rsyslog'@'localhost' IDENTIFIED BY 'YourPassword';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

[4] Konfigurasi rsyslog

Backup terlebih dahulu konfigurasi aslinya

cp /etc/rsyslog.conf /etc/rsyslog.conf.asli

Setelah itu masuk ke vi /etc/rsyslog.conf dan tambahkan konfigurasi seperti di bawah ini

# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514

# Load the MySQL Module
module(load="ommysql")


*.* :ommysql:127.0.0.1,Syslog,rsyslog,passwordAnda

Restart service

systemctl restart rsyslog

[5] Install LogAnalyzer

Untuk Download bisa akses ke url web nya atau bisa langsung wget, pilih versi yang stable

https://loganalyzer.adiscon.com/downloads/

wget http://download.adiscon.com/loganalyzer/loganalyzer-4.1.6.tar.gz

tar -zxvf loganalyzer-4.1.6.tar.gz

Buat direktori di var/www/html copy direktori src dan contrib nya ke direktory yang sudah di buat

mkdir /var/www/html/loganalyzer
cp -r src/* /var/www/html/loganalyzer/
cp -r contrib/* /var/www/html/loganalyzer/

Buat konfigurasi blank file php di direktori /var/www/html/loganalyzer, dan buat permission nya

touch config.php
chmod +x secure.sh
chown apache:apache config.php
chmod 777 config.php

[6] Buka LogAnalyzer web installer melalui web browser http://YourIPaddress/loganalyzer/

Cheers – Semoga bermanfaat

Install PAC Manager ( Ubuntu )

Perl Auto Connector Manager adalah Open Source GUI Linux yang biasa digunakan untuk me manage ssh, telnet, sftp, rdesktop, vnc, ftp session ke Server.

[1] Install PAC manager

wget http://sourceforge.net/projects/pacmanager/files/pac-4.0/pac-4.5.5.5-all.deb

sudo dpkg -i pac-4.5.5.5-all.deb
(Reading database ... 428047 files and directories currently installed.)
Preparing to unpack pac-4.5.5.5-all.deb ...
Unpacking pac (4.5.5.5) ...
dpkg: dependency problems prevent configuration of pac:
 pac depends on gtk2-engines-pixbuf; however:
 Package gtk2-engines-pixbuf is not installed.
 pac depends on libvte9; however:
 Package libvte9 is not installed.
 pac depends on libexpect-perl; however:
 Package libexpect-perl is not installed.
 pac depends on libnet-proxy-perl; however:
 Package libnet-proxy-perl is not installed.
 pac depends on libyaml-perl; however:
 Package libyaml-perl is not installed.
 pac depends on libcrypt-cbc-perl; however:
 Package libcrypt-cbc-perl is not installed.
 pac depends on libcrypt-blowfish-perl; however:
 Package libcrypt-blowfish-perl is not installed.
 pac depends on libgtk2-gladexml-perl; however:
 Package libgtk2-gladexml-perl is not installed.
 pac depends on libgtk2-ex-simple-list-perl; however:
 Package libgtk2-ex-simple-list-perl is not installed.
 pac depends on libnet-arp-perl; however:
 Package libnet-arp-perl is not installed.
 pac depends on libossp-uuid-perl; however:
 Package libossp-uuid-perl
dpkg: error processing package pac (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Errors were encountered while processing:
 pac

Jika terjadi Error seperti di atas solusi nya adalah seperti di bawah ini

sudo apt-get install -f

[2] Buka PAC Manager

Semoga bermanfaat

uGet ( Open Source Download Manager )

uGet adalah Open Source Download Manager yang support untuk Sistem Operasi Linux.

[1] Install uGet via official uGet PPA

sudo add-apt-repository ppa:plushuang-tw/uget-stable
sudo apt update
sudo apt install uget
space@space:~$ sudo apt install uget
[sudo] password for space: 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following packages were automatically installed and are no longer required:
 linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic
 linux-image-4.4.0-93-generic linux-image-extra-4.4.0-93-generic
 linux-signed-image-4.4.0-93-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
 uget
0 upgraded, 1 newly installed, 0 to remove and 285 not upgraded.
Need to get 317 kB of archives.
After this operation, 1.313 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 uget amd64 2.0.2-1ubuntu1 [317 kB]
Fetched 317 kB in 2s (148 kB/s)
Selecting previously unselected package uget.
(Reading database ... 389775 files and directories currently installed.)
Preparing to unpack .../uget_2.0.2-1ubuntu1_amd64.deb ...
Unpacking uget (2.0.2-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up uget (2.0.2-1ubuntu1) ...

space@space:~$ uget-gt

[2] GUI uGet Download Manager

Semoga bermanfaat – AnditoYugoWicaksono

Cheers..

FreeIPA Server

Konfigurasi IPA Server

[1] Preparing setting server IPA

yum -y update

Install bind-utils untuk cek nama domain sebelum digunakan

yum -y install bind-utils bind bind-dyndb-ldap

Gunakan command dig untuk mengecek Record A

dig +short ipa.zotma.co.id
192.168.10.10

Setting hosts di server

vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.10.10 ipa.zotma.co.id ipa

[2] Install IPA Server

yum -y install ipa-server
[root@ipa ~]# ipa-server-install

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
 * Configure a stand-alone CA (dogtag) for certificate management
 * Configure the Network Time Daemon (ntpd)
 * Create and configure an instance of Directory Server
 * Create and configure a Kerberos Key Distribution Center (KDC)
 * Configure Apache (httpd)
 * Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Do you want to configure integrated DNS (BIND)? [no]: no

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 [ipa.zotma.co.id]: ipa.zotma.co.id

The domain name has been determined based on the host name.

Please confirm the domain name [zotma.co.id]: ipa.zotma.co.id

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [IPA.ZOTMA.CO.ID]: IPA.ZOTMA.CO.ID
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 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):


The IPA Master Server will be configured with:
Hostname: ipa.zotma.co.id
IP address(es): 192.168.10.10
Domain name: ipa.zotma.co.id
Realm name: IPA.ZOTMA.CO.ID

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.

Configuring NTP daemon (ntpd)
 [1/4]: stopping ntpd
 [2/4]: writing configuration
 [3/4]: configuring ntpd to start on boot
 [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv). Estimated time: 30 seconds
 [1/45]: creating directory server instance
 [2/45]: enabling ldapi
 [3/45]: configure autobind for root
 [4/45]: stopping directory server
 [5/45]: updating configuration in dse.ldif
 [6/45]: starting directory server
 [7/45]: adding default schema
 [8/45]: enabling memberof plugin
 [9/45]: enabling winsync plugin
 [10/45]: configuring replication version plugin
 [11/45]: enabling IPA enrollment plugin
 [12/45]: configuring uniqueness plugin
 [13/45]: configuring uuid plugin
 [14/45]: configuring modrdn plugin
 [15/45]: configuring DNS plugin
 [16/45]: enabling entryUSN plugin
 [17/45]: configuring lockout plugin
 [18/45]: configuring topology plugin
 [19/45]: creating indices
 [20/45]: enabling referential integrity plugin
 [21/45]: configuring certmap.conf
 [22/45]: configure new location for managed entries
 [23/45]: configure dirsrv ccache
 [24/45]: enabling SASL mapping fallback
 [25/45]: restarting directory server
 [26/45]: adding sasl mappings to the directory
 [27/45]: adding default layout
 [28/45]: adding delegation layout
 [29/45]: creating container for managed entries
 [30/45]: configuring user private groups
 [31/45]: configuring netgroups from hostgroups
 [32/45]: creating default Sudo bind user
 [33/45]: creating default Auto Member layout
 [34/45]: adding range check plugin
 [35/45]: creating default HBAC rule allow_all
 [36/45]: adding entries for topology management
 [37/45]: initializing group membership
 [38/45]: adding master entry
 [39/45]: initializing domain level
 [40/45]: configuring Posix uid/gid generation
 [41/45]: adding replication acis
 [42/45]: activating sidgen plugin
 [43/45]: activating extdom plugin
 [44/45]: tuning directory server
 [45/45]: 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
WARNING: Your system is running out of entropy, you may experience long delays
 [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 certificate server (pki-tomcatd). Estimated time: 3 minutes
 [1/29]: configuring certificate server instance
 [2/29]: exporting Dogtag certificate store pin
 [3/29]: stopping certificate server instance to update CS.cfg
 [4/29]: backing up CS.cfg
 [5/29]: disabling nonces
 [6/29]: set up CRL publishing
 [7/29]: enable PKIX certificate path discovery and validation
 [8/29]: starting certificate server instance
 [9/29]: configure certmonger for renewals
 [10/29]: requesting RA certificate from CA
 [11/29]: setting up signing cert profile
 [12/29]: setting audit signing renewal to 2 years
 [13/29]: restarting certificate server
 [14/29]: publishing the CA certificate
 [15/29]: adding RA agent as a trusted user
 [16/29]: authorizing RA to modify profiles
 [17/29]: authorizing RA to manage lightweight CAs
 [18/29]: Ensure lightweight CAs container exists
 [19/29]: configure certificate renewals
 [20/29]: configure Server-Cert certificate renewal
 [21/29]: Configure HTTP to proxy connections
 [22/29]: restarting certificate server
 [23/29]: updating IPA configuration
 [24/29]: enabling CA instance
 [25/29]: migrating certificate profiles to LDAP
 [26/29]: importing IPA certificate profiles
 [27/29]: adding default CA ACL
 [28/29]: adding 'ipa' CA entry
 [29/29]: 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 ipa-custodia
 [1/5]: Generating ipa-custodia config file
 [2/5]: Making sure custodia container exists
 [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 the web interface (httpd)
 [1/22]: stopping httpd
 [2/22]: setting mod_nss port to 443
 [3/22]: setting mod_nss cipher suite
 [4/22]: setting mod_nss protocol list to TLSv1.0 - TLSv1.2
 [5/22]: setting mod_nss password file
 [6/22]: enabling mod_nss renegotiate
 [7/22]: disabling mod_nss OCSP
 [8/22]: adding URL rewriting rules
 [9/22]: configuring httpd
 [10/22]: setting up httpd keytab
 [11/22]: configuring Gssproxy
 [12/22]: setting up ssl
 [13/22]: configure certmonger for renewals
 [14/22]: importing CA certificates from LDAP
 [15/22]: publish CA cert
 [16/22]: clean up any existing httpd ccaches
 [17/22]: configuring SELinux for httpd
 [18/22]: create KDC proxy config
 [19/22]: enable KDC proxy
 [20/22]: starting httpd
 [21/22]: configuring httpd to start on boot
 [22/22]: 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/9]: stopping directory server
 [2/9]: saving configuration
 [3/9]: disabling listeners
 [4/9]: enabling DS global lock
 [5/9]: starting directory server
 [6/9]: upgrading server
 [7/9]: stopping directory server
 [8/9]: restoring configuration
 [9/9]: starting directory server
Done.
Restarting the KDC
Please add records in this file to your DNS system: /tmp/ipa.system.records.GWAaxa.db
Configuring client side components
Using existing certificate '/etc/ipa/ca.crt'.
Client hostname: ipa.zotma.co.id
Realm: IPA.ZOTMA.CO.ID
DNS Domain: ipa.zotma.co.id
IPA Server: ipa.zotma.co.id
BaseDN: dc=ipa,dc=zotma,dc=co,dc=id

Skipping synchronizing time with NTP server.
New SSSD config will be created
Configured sudoers in /etc/nsswitch.conf
Configured /etc/sssd/sssd.conf
trying https://ipa.zotma.co.id/ipa/json
[try 1]: Forwarding 'schema' to json server 'https://ipa.zotma.co.id/ipa/json'
trying https://ipa.zotma.co.id/ipa/session/json
[try 1]: Forwarding 'ping' to json server 'https://ipa.zotma.co.id/ipa/session/json'
[try 1]: Forwarding 'ca_is_enabled' to json server 'https://ipa.zotma.co.id/ipa/session/json'
Systemwide CA database updated.
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
[try 1]: Forwarding 'host_mod' to json server 'https://ipa.zotma.co.id/ipa/session/json'
Could not update DNS SSHFP records.
SSSD enabled
Configured /etc/openldap/ldap.conf
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Configuring ipa.zotma.co.id 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
 UDP Ports:
 * 88, 464: kerberos
 * 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

[3] Check fungsi dari IPA Server

Check terlebih dahulu bahwa Kerberos terinstall dengan benar dengan mencoba menginisialisasi token Kerberos untuk pengguna admin.

[root@ipa ~]# kinit admin
Password for admin@IPA.ZOTMA.CO.ID: 
[root@ipa ~]# klist 
Ticket cache: KEYRING:persistent:0:0
Default principal: admin@IPA.ZOTMA.CO.ID

Valid starting Expires Service principal
11/01/18 15:55:36 12/01/18 15:55:31 krbtgt/IPA.ZOTMA.CO.ID@IPA.ZOTMA.CO.ID

Ok, step yang terakhir verifikasi bahwa server IPA berfungsi dengan benar

[root@ipa ~]# ipa user-find admin
--------------
1 user matched
--------------
 User login: admin
 Last name: Administrator
 Home directory: /home/admin
 Login shell: /bin/bash
 Principal alias: admin@IPA.ZOTMA.CO.ID
 UID: 315600000
 GID: 315600000
 Account disabled: False
----------------------------
Number of entries returned 1
----------------------------

[4] Konfigurasi Firewall Server

firewall-cmd --add-service={ssh,dns,freeipa-ldap,freeipa-ldaps} --permanent 
success

firewall-cmd --reload 
success

[5] Masuk ke url IPA

Untuk check autentikasi nya bisa menggunakan skenario ini Web authentication menggunakan LDAP ( CentOS )

Untuk mengenali DN ldap nya bisa menggunakan cara seperti di bawah ini :

[root@ipa ~]# ldapsearch -x uid=nama
# extended LDIF
#
# LDAPv3
# base <dc=ipa,dc=zotma,dc=co,dc=id> (default) with scope subtree
# filter: uid=nama
# requesting: ALL
#

# nama, users, compat, ipa.zotma.co.id
dn: uid=nama,cn=users,cn=compat,dc=ipa,dc=zotma,dc=co,dc=id
objectClass: posixAccount
objectClass: ipaOverrideTarget
objectClass: top
gecos: nama saya
cn: nama saya
uidNumber: 315600005
gidNumber: 315600005
loginShell: /bin/sh
homeDirectory: /home/nama
ipaAnchorUUID:: OklQQTppcGEuYnJpc3lhcmlhaC5jby5pZDoxNjg2NTIxNi1mN2ExLTExZTctOW
 RmMC0wMDAxYTRhYWNjMWI=
uid: nama

# nama, users, accounts, ipa.zotma.co.id
dn: uid=nama,cn=users,cn=accounts,dc=ipa,dc=zotma,dc=co,dc=id
displayName: nama saya
uid: nama
objectClass: top
objectClass: person
objectClass: organizationalperson
objectClass: inetorgperson
objectClass: inetuser
objectClass: posixaccount
objectClass: krbprincipalaux
objectClass: krbticketpolicyaux
objectClass: ipaobject
objectClass: ipasshuser
objectClass: ipaSshGroupOfPubKeys
objectClass: mepOriginEntry
loginShell: /bin/sh
initials: ns
gecos: nama saya
sn: saya
homeDirectory: /home/nama
givenName: nama
cn: nama saya
uidNumber: 315600005
gidNumber: 315600005

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2

Setelah tau DN nya sebagai contoh sudah di beri tanda Bold

cn=users,cn=accounts,dc=ipa,dc=zotma,dc=co,dc=id

lalu tambahkan DN di atas ke dalam konfigurasi, dan lakukan login autentikasi.

Catatan : FreeIPA di atas tidak setup DNS, hanya untuk authentication LDAP user.

Cheers – AnditoYugoWicaksono