To reduce the cost, running rails are generally used as the return conductor for traction current in DC Railway systems. A notable part of the return current leaks on account of low resistance between ground and the rails. The leakage current or stray current shall be limited to avoid electrolytic corrosion of metallic structures. We use the state-of-art XGSLab tool to calculate the leakage current and provide solutions to limit them. Also, we calculate rail potential and design the earthing and bonding for the open environment railways to comply touch potential below the human safety limits.