In the past few years, numerous methods of attack against recommendation systems have been developed. Cellphones, smart devices, and self-driving cars are instances of distributed IoT consumer devices that generate massive amounts of data on a daily basis and pose security threats to the cloud server. Due to the higher exchange of data, the challenges in this domain lead to increased security issues. Therefore, intrusion detection systems are important for the security and privacy of IoT consumer devices and hence to the cloud server. Due to the prediction, classification of attacks and recommendation of malware devices, the accuracy of machine learning and deep learning approaches for research in security for IoT consumer devices has gained tremendous popularity. Federated learning (FL), is a privacy-preserving decentralized learning technique that does not transport data but instead trains the model locally before sending the parameters to a cloud server, which helps in ensuring the security of data. However, communication channels can still be attacked by hackers, so blocking malicious data is a major requirement for the cloud server. In this paper, a federated learning recommender hybrid intrusion detection system (FRHIDS) model has been proposed that detects the attacks on the SDN network incoming from the IoT consumer devices and recommends that the safety devices transmit the decrypted data to the federated cloud server. In this model, the preservation of the security and privacy model parameters by utilizing the process of testing and training has been implemented. Simulation shows that the proposed approach's well-designed recommender system has outperformed state-of-the-art models. The performance of the proposed technique is evaluated based on its computational complexity and validation, which have shown 12% improvement over the already existing techniques.