Xpack configuration in ELK stack

 

What is Xpack?

Elastic Stack, often known as ELK (Elasticsearch, Logstash, and Kibana), is a collection of extensions known as X-Pack. The Elastic Stack’s functionality is improved by X-Pack’s new features and capabilities, increasing its adaptability to a wider range of use scenarios

How to enable minimal security in ELK using xpack

Stop elasticsearch and kibana

systemctl stop elasticsearch
systemctl stop kibana

stop services

Edit elasticsearch.yml in /etc/elasticsearch and add,
xpack.security.enabled: true as shown below

nano /etc/elasticserach/elasticsearch.yml

xpack.security.enabled: true

Start elasticsearch and check status using,

systemctl start elasticsearch
systemctl status elasticsearch

Starting elasticsearch

Try to connect to elasticsearch from the browser using http://<IP>:9200, as note that a login page will be prompted.

accessing elasticsearch

Now change the directory to /usr/share/elasticsearch/bin

cd /usr/share/elasticsearch/bin

To generate random passwords for all usernames, we can use auto or else if we want to set own passwords we can use interactive command.
For the current scenario let’s use auto for generating random password, using

./elasticsearch-setup-passwords auto

generating passwords

Save the generated passwords with the usernames in a text file.

Now let’s change the directory to /etc/kibana and add elasticsearch.username and elasticsearch.password in kibana.yml file.

nano /etc/kibana/kibana.yml

Don’t change the username let it be the default one, copy and paste the password of the username.

kibana configuration

Now start and check the status kibana service.

systemctl start kibana
systemctl status kibana

starting kibana

Now go to the browser and access the kibana dashboard using,
http://<IP>:5601 there will be a login page displayed once Kibana server is ready.

kibana dashboard

Supply the username as “elastic” and password as the generated password.

With this we complete our xpack minimal security configuration.

You can find the step-by-step video:

Subscribe to our YouTube channel. https://www.youtube.com/@CyberToolGuardian/featured

Follow us on Instagram.
https://instagram.com/cybertoolguardian

Comments

Popular posts from this blog

Zeek Installation in Ubuntu

What is ELK and Installing ELK stack (elasticsearch, logstash, kibana) in Ubuntu

Sending Zeek logs to ELK using Filebeats