Abstract
Network conditions and traffic complexity evolution challenges the traditional firewall management system because it lacks proper adjustment mechanics. The study introduces an Artificial Intelligence system which produces automatic NGFW rules through live network traffic examination through packet analysis. Our assessment procedure directly measures the performance of GPT-2, GPT-4 and DeepSeek-R1 language models during their processing of raw PCAP data to generate security policies in real-time. AI models receive traffic flows delivered by Python tools Scapy and Wireshark to produce security rules by means of interactive prompting. DeepSeek-R1 demonstrated the highest rule accuracy of 92 % at its operational speed of 5000 packets per second, better than both GPT-4 and GPT-2 for accuracy and performance rates. The testing verifies that implementing large language models in automated firewall functions is feasible with the added advantage of specialized open-source solutions. The results form a foundation to develop interpretable secure network security systems supported by adaptive artificial intelligence frameworks