A Baltic Fleet sailor takes a photograph with a smartphone during Russian Navy day at the Vistula lagoon in Baltiysk, Russia, on July 31, 2016.

Russian lawmakers voted on Tuesday to ban its soldiers from using smartphones and social media to help prevent tracking of the nation's military operations.

The State Duma — Russia's parliament — approved the draft law on Tuesday, it said in a Twitter post.

Under the new legislation, military personnel will be banned from posting about themselves or colleagues online, using smart devices, and recording or distributing audio, photo, video or geolocation data.

The proposed law will now be passed on to President Vladimir Putin for formal approval, according to British newspaper The Times.

Digital activity has previously enabled media outlets to expose military operations that had been denied by the state. In recent years, pictures and social media posts posted by Russian soldiers have contradicted government assertions that the military was not fighting in Ukraine or involved in Syria's conflict.