Parents should be encouraging their children to spend more time online so that they can "save the country", the former head of GCHQ has said.
Britain is lagging behind other countries when it comes to cyber skills and is desperately short of computer scientists and engineers, Robert Hannigan warned.
He said the assumption that time online or in front of a screen is life wasted needed challenging and was driven by fear.
Gaming and social media can be as sociable as mooching around the streets with a group of friends, he argued.
Writing in the Daily Telegraph, he said: If you are spending a disproportionate amount of your holiday unsuccessfully attempting to separate your children from WiFi or their digital devices, do not despair. Your poor parenting may be helping them and saving the country.
We need young people to explore this digital world just as they explore the physical world.
We worry about being over-protective when they leave the house; we need to have the same debate about the balance of risk in the world of the internet.
Mr Hannigan, who stood down as the director of Britain’s electronic surveillance agency in January, was responding to remarks made by the Children’s Commissioner for England.
Anne Longfield earlier this week urged parents to moderate their children’s use of social media in the same way they limit junk food.
She said very young children are on the internet for more than eight hours a week, while 12 to 15-year-olds spend more than 20 hours a week online.
A new digital five-a-day campaign aims to ensure children are not left to use smartphones, computers or tablets without agreed boundaries, she said.
But Mr Hannigan warned the country lacked the broad cyber skills needed now, never mind in the next 20 years.
Traditional methods will not solve this. There are many excellent computer science and engineering teachers, but not enough, he wrote.
Fortunately, today’s young people have become good at learning through seeing and doing online.
They are teaching themselves in new ways. It follows that the best thing we can do is to focus less on the time they spend on screens at home and more on the nature of the activity.
The key is less passive watching and more inquisitive discovery, he said, allowing children to explore, experiment and break things as they always have done, but in the this day and age, digitally.