The vehicular ad hoc network (VANET) is a method through which Intelligent Transportation Systems (ITS) have become important for the benefit of daily life. Real-time detection of all forms of attacks, including hybrid DoS attacks in IEEE 802.11p, has become an urgent issue for VANET. This is due to sporadic real-time exchange of safety and road emergency message delivery in VANET. Sporadic communication in VANET has the tendency to generate an enormous amount of messages. This leads to overutilization of the road side unit (RSU) or the central processing unit (CPU) for computation. Therefore, efficient storage and intelligent VANET infrastructure architecture (VIA), which includes trustworthiness, are required. Vehicular Cloud and Fog Computing (VFC) play an important role in efficient storage, computation, and communication needs for VANET. This research utilizes VFC integration with hybrid optimization algorithms (OAs), which also possess swarm intelligence, including Cuckoo/CSA Artificial Bee Colony (ABC) and Firefly/Genetic Algorithm (GA), to provide real-time detection of DoS attacks in IEEE 802.11p, using VFC for a secure intelligent vehicular network. Vehicles move ar a certain speed and the data is transmitted at 30 Mbps. Firefly Feed forward back propagation neural network (FFBPNN) is used as a classifier to distinguish between the attacked vehicles and the genuine vehicles. The proposed scheme is compared with Cuckoo/CSA ABC and Firefly GA by considering jitter, throughput, and prediction accuracy.http://dx.doi.org/10.3390/electronics807077