An intrusion detection system’s (IDS) key role is to recognise anomalous activities from both inside and outside the network system. In literature, many machine learning techniques have been proposed to improve the performance of IDS. To create a good IDS, a single classifier might not be powerful enough. To overcome this bottleneck researchers focus on hybrid/ensemble techniques. Such methods are more complex and computation intensive, but they provide greater accuracy and lower false alarm rates (FAR). In this paper, we propose a bagging ensemble that improves the performance of IDS in terms of accuracy and FAR where the NSL-KDD dataset has been used to classify benign and abnormal traffic. We have also applied the information gain-based feature selection method to select highly relevant features for improving the accuracy of the proposed technique and achieved 84.93 % accuracy and 2.45 % FAR on the test dataset.