Legged locomotion systems, especially anthropomorphic mechanisms, can be modeled by using highly complex dynamic structures. In order to model these complex dynamic structures, some assumptions must be made, such as no-friction, rigid links or non-redundancy. However, with the dynamic simulators developed in recent years, it has become possible to create dynamic models without making any assumptions. In this study, a posture control algorithm was developed to automatically balance a six-legged mobile robot against external dynamic effects such as incline or contact polygon changes. A model-based control structure is preferred in order to implement the posture control algorithm to the robot control. The reference model used in model-based control was created using the ODE (Open Dynamics Engine) physics simulator. The reference model created on the ODE is always in communication with the IMU (Inertial Measurement Unit) sensor connected to the robot's body. For this reason, all the dynamic effects including externally applied forces to the real robot can be considered in the control process without making any assumptions. Consequently, real-time application results of the six-legged mobile robot on a moving platform are observed and the results have shown better performance as depicted on graphs.