The detection rate of network intrusion detection systems mainly depends on relevant features; however, the selection of attributes or features is considered an issue in NP-hard problems. It is an important step in machine learning and pattern recognition. The major aim of feature selection is to determine the feature subset from the current/existing features that will enhance the learning performance of the algorithms, in terms of accuracy and learning time. This paper proposes a new hybrid filter-wrapper feature selection method that can be used in classification problems. The information gain ratio algorithm (GR) represents the filter feature selection approach, and the black hole algorithm (BHA) represents the wrapper feature selection approach. The comparative analysis of network intrusion detection methods focuses on accuracy and false positive rate. GBA shines with exceptional results: achieving 96.96% accuracy and a mere 0.89% false positive rate. This success can be traced to GBA's improved initialization via the GR technique, which effectively removes irrelevant features. By assigning these features almost zero weights, GBA hones its ability to accurately spot intrusions while drastically reducing false alarms. These standout outcomes underline GBA's superiority over other methods, showcasing its potential as a reliable solution for bolstering network security.