Russia’s State Duma on Tuesday voted to ban members of the armed forces from publishing information online about their military units, deployments and other personal information, including photos, video and geolocation data.

They will also be forbidden from carrying smartphones or other smart devices that can connect to the internet and can save data such as photos. Older mobile phones will not be banned, according to The Guardian.

The move comes after a series of open-source investigations revealed their secret participation in foreign conflicts.

At the same time, Russian officials claimed the ban was needed to protect secret military information from foreign intelligence services. The text of the legislation specifically noted attention to Russia’s recent military campaign in Syria.

Russians often post photographs and details about their military service on the social networks Vkontakte and Odnoklassniki as a way to stay in touch with fellow soldiers.

But the data has also allowed open source investigators to follow the activities of Russian forces fighting secretly in Ukraine and in Syria, sometimes in real time.

In particular, social media data has allowed journalists to track military units active in south-east Ukraine, where Russia said its forces were not present.

One analysis by the investigative site Bellingcat tracked soldiers transporting a surface-to-air missile system believed to be tied to the downing of Malaysia Airlines flight MH17. In a video called Selfie Soldiers, Vice News managed to track down a Russian soldier from Buryatia in central Russia who had posted photos from east Ukraine during the conflict.

Social media accounts have also been used in a number of cases to confirm casualties among members of Russian armed forces in east Ukraine and Syria.