Intrusion Detection System using NSL-KDD Dataset and Decision Tree Machine Learning Algorithm

Authors

Victor Somadina ND-ASOGU

Department of Computer Science, College of Computing and Information Sciences, Caleb University, KM 15, Ikorodu-Itoikin Road, Imota, P.M.B. 21238, Lagos State (Nigeria)

John Oluwadara FATOKUN

Department of Mathematics, College of Pure and Applied Sciences, Caleb University, KM 15, Ikorodu-Itoikin Road, Imota, P.M.B. 21238, Lagos State (Nigeria)

Chukwudi Anthony UDEMBA

Department of Computer Science, College of Computing and Information Sciences, Caleb University, KM 15, Ikorodu-Itoikin Road, Imota, P.M.B. 21238, Lagos State (Nigeria)

Olajide ADEGUNWA

Department of Computer Science, College of Computing and Information Sciences, Caleb University, KM 15, Ikorodu-Itoikin Road, Imota, P.M.B. 21238, Lagos State (Nigeria)

Jelili Idris Olawale

Department of Cybersecurity, School of Science and Technology, Christopher University, Mowe, Ogun State (Nigeria)

Rashid Kehinde OLOKO

Department of Computer Science, College of Computing and Information Sciences, Caleb University, KM 15, Ikorodu-Itoikin Road, Imota, P.M.B. 21238, Lagos State (Nigeria)

Theophilus Bamise AJALA

Department of Computer Science, College of Computing and Information Sciences, Caleb University, KM 15, Ikorodu-Itoikin Road, Imota, P.M.B. 21238, Lagos State (Nigeria)

Article Information

DOI: 10.51244/IJRSI.2026.1307000395

Subject Category: Computer Science

Volume/Issue: 13/7 | Page No: 5372-5380

Publication Timeline

Submitted: 2026-08-08

Accepted: 2026-08-14

Published: 2026-08-20

Abstract

A firewall is designed to filter traffic, block unauthorized access, and allow authorized access. Modern network hardware contains vulnerabilities that can be exploited by attackers to compromise network security. The aim of this project is to propose an efficient machine learning model to analyze the vulnerabilities in firewall logs. The project implemented decision tree classifier on a NSL-KDD dataset pulled from Kaggle ML repository. This dataset contains 127,000+ instances of vulnerabilities. In order to build a web app, the input features of the dataset were reduced from 41 to 5 within the Streamlit interface to enhance prediction speed, reduce resource consumption etc. The following performance metrics were obtained for the selected model: Accuracy: 99.31%; Precision: 98.98%; Recall: 99.54% and F1-Score: 99.26%. The inclusion of quantitative metrics, visual evaluation and a real time web application prototype that helps bridge academic exploration and industrial relevance serves as a contribution to knowledge in firewall detection system. The outcome of the research proves that all these measures of accuracy show that the decision tree model is precise, reliable and suitable for practical implementation in analysis of firewall logs in order to detect the existing vulnerabilities for system engineers. There are some distinct benefits of applying machine learning to the problem of firewall vulnerability analysis, hence, this study has been able to contribute to the field of firewall and intrusion detection system in modern hardware system.

Keywords

Firewall, Intrusion detection, Machine Learning, Decision Tree Classifier

Downloads

References

1. Bagale, G. S., Vandadi, V. R., Singh, D., Sharma, D. K., Garlapati, D. V. K., Bommisetti, R. K., & Sengan, S. (2021). Small and medium-sized enterprises’ contribution in digital technology. Annals of Operations Research, 1-24. [Google Scholar] [Crossref]

2. Khraisat, A., Gondal, I., Vamplew, P., and Kamruzzaman, J. (2019). Survey of intrusion detection systems: techniques, datasets and challenges. https://doi.org/10.1186/s42400-019-0038-7. [Google Scholar] [Crossref]

3. Mienye, I.D., and Jere, N. (2016). ASurvey of Decision Trees: Concepts, Algorithms, and Applications. https://doi.org/10.1109/ACCESS.2024.3416838. [Google Scholar] [Crossref]

4. Ogundairo, O., and Broklyn, P. (2024). Automated Vulnerability Assessment Using Machine Learning. [Google Scholar] [Crossref]

5. Saha, D., and Manickavasagan, A. (2021). Machine learning techniques for analysis of hyperspectral images to determine quality of food products: A review. https://doi.org/10.1016/j.crfs.2021.01.002. [Google Scholar] [Crossref]

6. Shaheed, A., and Kurdy, M.H.D. (2021). Web Application Firewall Using Machine Learning and Features Engineering. https://doi.org/10.1155/2022/5280158. [Google Scholar] [Crossref]

7. Song, Y., and Lu, Y. (2015). Decision tree methods: applications for classification and prediction. http://dx.doi.org/10.11919/j.issn.1002-0829.215044. [Google Scholar] [Crossref]

8. Stergiou, C., Psannis, K. E., Gupta, B. B., & Ishibashi, Y. (2018). Security, privacy & efficiency of sustainable cloud computing for big data & IoT. Sustainable Computing: Informatics and Systems, 19, 174-184. [Google Scholar] [Crossref]

9. Sunyaev, A., & Sunyaev, A. (2020). Internet computing (pp. 237-264). New York, NY, USA: Springer International Publishing. [Google Scholar] [Crossref]

Metrics

Views & Downloads

Similar Articles