Security of the information in the computer networks has been one of the most important research area. To preserve the secure condition it is essential to be aware of the behavior of the incoming data. Network Security is becoming an important issue for all the organizations, and with the increase in knowledge of hackers and intruders they have made many successful attempts to bring down high-pro le company networks and web service. The technology of artificial intelligence breaks a new way in the area of network security. Ant-colony optimization algorithm is an evolutionary learning algorithm which could be applied to solve the complex problems. Applying the idea of ant colony optimization into network vulnerability detection and enhancing security can improve the performance of network security management. This paper attempts to apply ACO Algorithm to find out vulnerabilities in the network and ensure its security.