Network security has become imperative in the context of our interconnected networks and everyday communications. Recently, many deep learning models have been proposed to tackle the problem of predicting intrusions and malicious activities in interconnected systems. However, they solely focus on binary classification and lack reporting on individual class performance in case of multi-class classification. Therefore, the need for an efficient and accurate network intrusion detection system has reached a pivotal point. In this paper, we propose a novel intelligent detection system based on convolutional neural network, namely DCNN. The proposed model can be utilized to analyze and detect attacks and intrusions in intelligent network systems. The DCNN model is applied against two benchmark datasets and compared with state-of-the-art models. Experimental results show that the proposed model improved resilience to intrusions and malicious activities for binary as well as multi-class classification. Furthermore, our DCNN model outperforms similar intrusion detection systems in terms of positive predicted value, true positive rate, F1 measure, and accuracy. The scores obtained for binary and multi-class classifications on the CICIoT2023 dataset are 99.50% and 99.25%, respectively. Additionally, for the CICIDS-2017 dataset, DCNN attains a score of 99.96% for both binary and multi-class classifications.