Abstract—The sixth generation (6G) of mobile communications, expected to be deployed around the year 2030, is predicted to be characterized by ubiquitous connected intelligence. With Artificial Intelligence (AI) operations being deployed in every aspect of future network infrastructure, network security will also evolve from current solutions to intelligent architectures. To meet the massive amount of operations computed by AI models, photonic hardware can be exploited, delivering higher processing speed and computing density and lower power consumption with respect to electronic counterparts. In this paper, we propose a photonic-based Convolutional Neural Network (CNN) solution able to work on real-time traffic, capable of identifying Denial of Service (DoS) Hulk attacks with 99.73 mean F1-score when exploiting 4 bits. We also compared photonic accelerators with their electronic counterparts, showing limited F1-score degradation, especially in the 4 and 8 bit scenarios.