For many researchers, defense against DDoS attacks has always been a major subject of attention. Within the LEO Satellite-Terrestrial (LSTN) network field, distributed denial of service (DDoS) attacks is considered to be one of the most potentially harmful attack techniques. For the facilitation of network protection by the detection of DDoS malicious traces inside a network of satellite devices, machine learning algorithms plays a significant role. This paper uses modern machine learning approaches on a novel benchmark Satellite dataset. The STIN and NSL-KDD datasets has been used to detect network anomalies. The pre-processing of data has been performed effectively and a host of ML methods have been applied to classify the outputs into normal, regular node or untrustable /malicious node. We have evaluated the analysis results in presence of attacks as well as without presence of attacks, supervised machine learning techniques basic measurements like accuracy, True positive, False positive etc. Our proposed trust model shows better accuracy, nearby 98% and we have shown that our proposed machine learning based security model performs better to get rid of DDoS attacks on integrated LEO satellite-terrestrial networks without compromising on the packet routing efficiency. We are able to improve routing speed and improve network security against distributed denial of service (DDoS) attacks by integrating an ensemble-based trust model trained on NSL-KDD+STIN+Exata Simulated resultant dataset with ACO for routing decisions. In dynamic network scenarios, as trustworthiness is an essential criterion in route decision-making, this proposed approach signifies resilient and adaptable routing.