SecOps (Task - 5)

SecOps (Task - 5)

Task completed under guidance of World Record Holder Vimal Daga sir

Problem Statement :-

Create a automated system which will be useful for a server in terms of following featues:-


1. This system will keep log of the information about the clients hit or request to the server for example we can get log file of a webserver at location /var/log/httpd/


request for example if a client is sending request repeatedly. for this purpose we can use here clustering to make clusters of different patterns of client request and to identify which cluster of client requests can cause some security and performance issue in the server


3. If any kind of unusual pattern we got then we can use jenkins to perform certain task for example it can run some command to block that ip which is causing this trouble.

Here I'm explaining about my work :-

If we try to access the file in any web server which have only restricted permissions and not allowed to access by others then If we access them then the status code will be recorded as non 200 in the Apache access log file and I used that one to do my task.

I created automated system in Jenkins and the Jobs in Jenkins will do the following steps :-

-> First Job will Copy the access log file of apache2 from /var/log/apache2/access.log file to the destination directory and grants permissions to the log file and downloads the git repo and copies into the same destination directory...

No alt text provided for this image
No alt text provided for this image

-> Second Job will work with 3 python scripts and they will execute in the following manner

-> 1.txt_to_csv.py program will take input file which is access.log and creates a csv file in access.csv format

->2.headers.py will initialize the headers to the csv file and saves as task_5_final.csv

->extract_ip.py program will extract the ip address of the ip which is tried to access unauthorized files and it will dump the ip addresses into final.txt file

No alt text provided for this image
No alt text provided for this image

->Third job will take input from the final.txt file and bash shell will block that ips using the command

iptables -A INPUT -s ip_address -j DROP

No alt text provided for this image
No alt text provided for this image

Build-Pipeline view of all Jobs

No alt text provided for this image
No alt text provided for this image

And the final result of the task:-

Before Blocking the ip of a Windows pc

No alt text provided for this image

After ip blocked by Jenkins :-

No alt text provided for this image

Thanks to Vimal Daga Sir for providing very valuable content to all of us.......




To view or add a comment, sign in

More articles by Sridhar R

  • KUBERNETES: CASE-STUDY

    What is Kubernetes? Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and…

    1 Comment
  • AMAZON SQS: USE-CASES

    What is Amazon Simple Queue Service? Amazon Simple Queue Service (Amazon SQS) offers a secure, durable, and available…

    3 Comments
  • MongoDB: CASE-STUDY

    What is MongoDB? MongoDB is a document-oriented NoSQL database used for high-volume data storage. Instead of using…

    6 Comments
  • OPENSHIFT : CASE STUDY

    What is Red Hat OpenShift? OpenShift is a family of containerization software products developed by Red Hat. Its…

  • Jenkins : Case Study

    What is Jenkins? Jenkins® is an open-source automation server. With Jenkins, organizations can accelerate the software…

  • AZURE KUBERNETES SERVICE(AKS): CASE STUDY

    SoftBank Corp. quickly develops an app with Azure Kubernetes Service (AKS), improves in-store service for customers The…

  • Role of Neural Networks in Tesla

    What are Neural Networks? Neural networks are a set of algorithms, modeled loosely after the human brain, that is…

    1 Comment
  • AI_ON_AWS SelfReflection

    In workshop regarding AI_ON_AWS conducted by Vimal sir discussed the following topics Amazon Comprehend : Advanced text…

  • How Microsoft solving challenges using Ansible....

    What is Ansible Ansible is a software tool that provides simple but powerful automation for cross-platform computer…

  • Self-Reflection of Practical Demo session by Experts from RedHat

    In the program of ARTH-The School Of Technologies attended Expert's session Practical Demo of Enterprise Level…

    1 Comment

Others also viewed

Explore content categories