Following a series of social media scandals, a few days ago Israeli military commanders were told to stop recruits uploading videos and pictures "not appropriate to the spirit of the IDF".
Two soldiers were also sent to military prison for 14 and 21 days for posting a clip of their artillery battalion performing a version of the Harlem Shake.
The video had been well-received online and in the Israeli mainstream media.
"It's just a sign of the times when you see soldiers dancing and reacting to internet sensations like the Harlem Shake," says Guy Lerer, presenter of Israeli Channel 10's programme about the internet, The Night Tube.
"I think that the army shouldn't be embarrassed about that. It shows the world that Israeli kids are like kids everywhere else."
Israel is not the only country that has found it difficult to prevent soldiers from sharing details of their lives in uniform online.
However, in a country where most 18-21-year-olds do military service, it is a particular challenge.
A recent ComScore study found that Israelis spend longer on social networks than users anywhere else.
Social media have also produced a new frontline in the conflict with Palestinians.
Israeli citizens and Jews overseas have been recruited to various public diplomacy campaigns to promote Israel on the internet.
Online activists on both sides also scour the net for videos, comments and photos giving insights that support their views. IDF soldiers' personal accounts are among those monitored.
Last month, a 20-year-old Israeli soldier was reprimanded for posting a photograph of a Palestinian boy's head in the crosshairs of a sniper's rifle.
The picture was discovered on Instagram by Palestinian activist, Ali Abunimah, a co-founder of the Electronic Intifada website.
"We look at social media accounts coming out of Palestine/Israel, whether it's Instagram or Twitter or YouTube. We're really looking for anything interesting and newsworthy," he says. "We'll investigate it and try to find some context."
His website had hundreds of thousands of hits after it published sets of controversial Instagram pictures by Israeli recruits. International media also picked up on them.
"They had an enormous impact. I think people saw different things in them. When I looked at the picture of the child in the crosshairs, to me it really captured in a sense symbolically the way that the Israeli army and occupation views Palestinians - as potential targets," Mr Abunimah says.
The IDF was quick to tell reporters that sharing the photograph was "a severe incident", out of keeping with its values.
Other Instagram photographs since highlighted by Electronic Intifada include an American-Israeli soldier apparently posing naked with guns while on base and illegally smoking marijuana. His public comments express hatred of Arabs.
While the Israeli army had already issued warnings to soldiers not to reveal details of future operations, it now wants to stop them posting videos and pictures of themselves on the Internet.
"Recently we're witnessing a growing and expanding phenomenon in which soldiers from all IDF units disseminate through social platforms in which they are active… visual content which is not appropriate to the spirit of the IDF," stated a memo circulated to commanders.
The IDF has embraced the Web with its own official Facebook page and Twitter feed. However, it is worried that unofficial uses can damage its image.
"This is a democracy. We cannot ban soldiers or anyone else from using smart phones and mobile devices but we are a military with strict orders," says head of interactive media, Avital Leibovich.
"A soldier is a soldier wherever he is. He has to behave within the moral and ethical code of the IDF in his house with his friends, with his colleagues in the military and in social media."
On Ben Yehuda Street in West Jerusalem, off-duty soldiers mill about still wearing their khaki uniforms.
Most liked the Harlem Shake video and are sceptical about whether the military can change their online behaviour.
"I can do whatever I like. Yes, I'm in the army but I'm not a robot or something," says one young soldier. "It's too harsh to be put into prison for the Harlem Shake."
"You have to remember that we are people who are 18-years-old. We want to show pictures on Facebook," adds his female comrade.
"Maybe people will be careful for a few months because of these incidents but I don't think we will change completely."