Elasticsearch Stack Install Part 2 Kibana

So we will be picking up where we left off. We have already installed Elasticsearch so if you have not completed that step yet, Part 1 is here. On with Kibana…

Step 1 Install Kibana:

sudo apt-get update && sudo apt-get install kibana
Screen Shot 2018-02-27 at 8.06.39 AM
Next we will connect the server to our localhost like we did with Elasticsearch.
sudo nano /etc/kibana/kibana.yml
– Delete the # in front of server.host: “localhost”
– control-x
– y to save
Screen Shot 2018-02-27 at 8.12.55 AM
Next we will set Kibana to start at boot just like we did with Elasticsearch.
sudo /bin/systemctl daemon-reload
Screen Shot 2018-02-27 at 8.17.10 AM
Next we will start and check the service.
sudo systemctl start kibana.service
sudo systemctl status kibana.service
Screen Shot 2018-02-27 at 8.19.18 AM
Step 2 Install NGINX
sudo apt-get -y install nginx
Screen Shot 2018-02-27 at 8.23.36 AM
Create an admin user named kibadmin to log on to our Kibana front end.
 
sudo -v
echo “kibadmin:`openssl passwd -apr1`” | sudo tee -a /etc/nginx/htpasswd.users
Screen Shot 2018-02-27 at 8.26.28 AM
Create a new configuration for our nginx application, create a backup of the original one.
sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/original_backup_defaultScreen Shot 2018-02-27 at 8.28.26 AM
Create a new nginx configuration
sudo nano /etc/nginx/sites-available/default
Copy this to file:

server {
listen 80;

server_name Your_own_Ubuntus_IPAddress;

auth_basic “Restricted Access”;
auth_basic_user_file /etc/nginx/htpasswd.users;

location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection ‘upgrade’;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

Screen Shot 2018-02-27 at 8.31.28 AM

Test your configuration and restart the nginx service
sudo nginx -t
sudo systemctl restart nginx
Screen Shot 2018-02-27 at 8.33.44 AM
Now go to your browser and type your IP address and log in with the kibadmin account you created and you should be greeted with the Kibana front end interface.
Screen Shot 2018-02-27 at 8.38.08 AM
So that is it, if you have been with us since Part 1 you should have Elasticsearch and Kibana up and running. Until next time.
Happy Hunting,
Marcus
References: https://cyberwardog.blogspot.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s