Syrian refugees make up a quarter of Lebanon's population, the country's fragile systems are stretched and tensions are rising. Charities and NGOs are battling to get 70,000 children into schools, and families living in flimsy tents face another harsh challenge – the winter snows are only weeks away

As you come through the military checkpoints on the way into Wadi Khaled, local mobile phones bleep with an unsolicited text: "The Ministry of Tourism welcomes you to Syria."

This part of northern Lebanon, which juts like a knucklebone into Syria, is so close to the war that the villagers can watch the rockets land and palls of smoke rising across the hillsides. Children have swarmed up on to the first floor of the shell of a half-built house and are pointing excitedly to where the outlying villages of Homs begin. "I can see our house," shouts Satash, six.

His mother, Maro, 28, stands back with her eyes cast down. "The older girls come up here and spend hours and hours sitting and looking out at Syria. I cannot even look."

Satash's home is, in reality, long gone. He now lives in Lebanon, in what used to be a shed for slaughtering chickens, with his parents and grandparents, his three-year-old sister and six orphaned cousins. The cousins' mother was killed by shelling that stopped the delivery of medicines to treat her sickness; their father died from shrapnel wounds.

After fleeing in the middle of the night when a shell landed in their yard, taking only the clothes they stood up in, the family walked south for seven hours before crossing into Lebanon. They wandered for several months looking for help and accommodation, and ended up in the village of Knaisse in Wadi Khaled, only three miles from their Syrian home.

The family live in a shed, the rent waived by a kindly Lebanese. They have one blanket between five people, and plastic bags stuffed along the flimsy roof to stop the rain coming in. The grandmother lies on a scrap of matting, suffering from afflictions for which there is no money to buy treatment.

Maro and family live on a small monthly cash handout from a UN agency. Like most of the 1.3 million Syrian refugees now in Lebanon, a country of just 4.2 million people, they are worried about the snow that will start falling on the hills of Wadi Khaled within weeks. This will be their second winter here. "The room becomes like a refrigerator in the winter, the water floods like a lake all around and the wind is so cold," said Maro's husband, Ahmad, who is clearly under strain. He shouts again and again: "The people who stayed are dead under the rubble!"

He is worried, Maro told me, especially about the safety of the two teenage girls, who he doesn't want to go outside the tiny room.

"There is no work for him to do," Maro said apologetically. "We feel so humiliated. People tell us to thank God we have a roof. They look at our poor clothes and how we eat poor food, and they think we are used to being like this. They didn't see our houses in Homs, our gardens. Yes, thank God we are alive. But it is hard: we lost everything, in one minute. Not the building, but the home my husband and I had spent our lives making for our family. The girls go into the village and look at the clothes shop, like any teenage girls, but they have one set of thin clothes and they are wearing them."

lebanon graphic Photograph: Guardian

Lebanon remains in relative peace, but the influx of Syrians is putting a strain on its resources, and tensions are rising. The little nation has not finished rebuilding after its own civil war and its factions are many. The country remains vulnerable to the demographic changes that the influx of mainly Sunni Muslim Syrians is bringing.

A permanent demographic shift could imperil fragile religious balances that are currently in political limbo. Run by an interim government and with elections overdue, Lebanon operates a confessional system – key government offices are reserved proportionally for representatives of religious factions.

Last week the country's second city, Tripoli, rang with gunfire. Deaths were reported every night in its suburbs as Alawite fought with Sunni in violence that mirrors the ferocity within Syria.

This time last year some 300,000 Syrians had crossed into Lebanon; so many more have arrived since March this year that one in four residents are Syrian refugees. The UNHCR registration centre in Tripoli, which is struggling to process all the newcomers, expects the number to rise to two million by early next year. Syrians can still cross the border easily, although there are growing political mutterings in Beirut about closing it, and opinions are becoming inflamed by Lebanon's rising crime rate – it has rocketed by 30% in the past year.

The cost of living in Lebanon is far higher than in Syria. There are water and electricity scarcities and even refugees who managed to bring savings with them have seen their money disappear at a terrifying rate.

Burned by bitter experience with Palestinian refugees – 400,000 of whom remain in the country in desperate conditions of deprivation and violence – Lebanon has refused to follow Jordan's example and allow the provision of refugee camps. No shelter can have more than a basic timber-and-plastic structure; more robust building by refugees is prohibited.

While there are widespread reports of extraordinary acts of generosity and kindness by Lebanese towards Syrian refugees, many people here are making money from Syria's war. Landlords are getting rents for barely habitable properties, stables and outhouses. There are hefty profits to be made in the gun-running business, and refugees are easily exploited as cheap labour. The government is getting military resources from America and Europe, which are keen to see it able to protect its borders. But many others are losing out – those who are trying to house and feed large families along with their own. Resentment is rising.

Meanwhile, at the border more and more checkpoints are going up, guns are going in and refugees are coming out. The sparks are all here for Lebanon to catch Syria's fire.

Bar Elias is a town on the refugee corridor through Lebanon's Bekaa Valley. Its population was 50,000 before the crisis. Now it is 100,000, doubled by Syrian refugees who live in tents, in half-built houses, in garages, in spare rooms. Mayor Saad Maita mourns his pet projects: two new municipal parks – "refugees moved in before a Lebanese family had set foot inside" – and a bypass on which work has stalled since the refugees arrived.

"We don't have the money: sometimes we don't have the money to pay all our employees," said the mayor. "Imagine, we had problems with refuse collection and sewage systems before; now we have double the demand and no new trucks or staff. Drinking-water consumption has tripled and refugees are breaking pipelines to get water. We have only three policemen, so every time there is a dispute between our populations I have to go myself to deal with the tensions.

"The irrigation channels and small rivers to our farms are being blocked by the refugees. Overcrowding in homes is a problem and rents have doubled and tripled, even for businesses. Wages are being driven down. The Lebanese people were already suffering. They give everything they can to the refugees, but it is exhausting for everyone. I ask for help, but from the government and the UN we get only promises. We hope this will have a happy ending, but I fear it will lead to the collapse of two countries."

Like many towns in Lebanon, Bar Elias has started running night shifts at schools to teach some of the Syrian children, who are not allowed into the state schools and have no money for the private ones. Education is becoming a cause of despair for Syrian parents. Many of their children have now been out of school for three years. The Lebanese government is dragging its feet on whether or not to start educating their Syrian guests, aware that it would lead to an overwhelming and immediate doubling of their 300,000 school population. But the risk is that if the war grinds on and they don't provide education, those kids become Lebanon's next problem – a generation of disaffected, unemployable young misfits.

Sonia Zambakides is country director for Save the Children in Lebanon, which is aware of possible resentments building up among Lebanon's poor towards refugees and is trying to run projects open to both communities. "It's a huge challenge that we are trying to meet with a combination of accelerated learning programmes, extra tuition and non-formal education to ensure children keep learning," she said. "By the end of this year, we're aiming to have 70,000 refugee children in education programmes. We're working with the Lebanese ministry of education to ensure that by the start of the 2014 school year, every Syrian child is back in education.

"These children's lives have been torn apart. Most of them have been out of school for two years or more. Many are traumatised and have witnessed unspeakable horrors. Education brings a sense of normality and structure. If we don't get them back into education they face a lifetime of deprivation. They run the risk of becoming militarised, exploited and working as child labourers. The girls may be forced into early marriages. If we don't get them back to school now, it will be too late for many."

NGOs are struggling to find funding for the crisis. Save the Children has less than half of the money it needs and is already working on the biggest "winterisation" programme ever attempted – an effort to try to reinforce the flimsy shelters with sheets of plastic and plywood.

Uppermost in every refugee's mind is winter. Snow will blanket this area within weeks. In one of the tented settlements in Bar Elias, people are salvaging anything they can to insulate their ramshackle tents. There are 120 tents here: people are digging their own latrines and the place is infested with rats and snakes.

Abu Fadi was building a flimsy structure for his family of 11. "I don't have enough wood yet," he said. "I need more and I will pack the floor up with sand. It's weak though: the weight of the snow will bring it down. I am lucky as I worked in construction in Syria, so I have a rough idea what to do. I just hope to survive until we can go home."

In Knaisse, Maro is fretting that her younger children are playing in the dirt. "They will get disease. I try to make them stay inside, but it is cold and they have no toys. They fight. I worry they will never attend school. I get angry. I even smacked them once. I am ashamed: in Syria I never did this. I wish we'd stayed in Syria. I wish we didn't leave. Even in war, we had dignity. We want to go home."

■ For details of Save the Children's Syria appeal, see savethechildren.org.uk/save-syria-children

CASE STUDY

Eight months pregnant, Fatima, 35, left Syria with her six other children six months ago. Her husband had disappeared and her street was bit by bit being reduced to rubble. Her home was being used as a field hospital and her eldest son leapt from roof to roof by night as a runner bringing in medicines.

They left the besieged city of Homs in the night as the Free Syrian Army hoisted a plastic sheet across the road to shroud the fleeing people from snipers. "The journey is a blur, the children were so frightened their skin was inflamed. All I know is that we have reached somewhere where they will not be shot."

They live in the concrete shell of an unfinished building in Machta Hammoud, north Lebanon, that was being used to house sheep. There is no sanitation or running water and at first the Lebanese landlord wanted $200 a month for rent. "Then he saw how we had nothing and he gave us this space for free. He put in an electric light and gave us a plastic covering for part of the concrete floor. His wife brings us food and gave us sheets. She goes without water herself some days so that we can have enough."

Snakes, yellow scorpions and big spiders are visitors through the gaps in the cold, damp walls. There is no door, or windows. "The children do not wander, in Syria they had to stay indoors for two years, so they are scared to go outside. They have seen the blood, the dead people, the terrible things."

Another two Syrian families have now moved in to other rooms. "it wasn't made for living, but they have done their best to get it clean," said the owner's wife, Um Ahmad. "We have to help. Our water tank is not enough for my family of 11, but we get by. We are Lebanese, they are Syrian, we are under God and all trying to give them what we can for free. How could we not?"