A Libyan woman holds up ammunition while learning how to use a weapon in Benghazi. Photograph: Esam Al-Fetori/Reuters

A flattened lamp-post, two neat rows of bullets and a no-left-turn sign lying on the tarmac road mark the frontline in Libya's western mountains.

Nearby are seven young men, leaning against a battle-scarred building they say was once a guardhouse for Italian soldiers during the second world war. Another sits on a rock, gazing into the desert of no man's land in search of Muammar Gaddafi's forces, said to be little more than a mile away.

The advance in the Nafusa mountains has raised hopes of a significant breakthrough for rebels striving to reach Tripoli and topple Gaddafi. Whereas the battlefields in eastern Libya have reached a virtual stalemate, rebel soldiers have seized 25 miles of this arid, hot, rocky terrain in recent weeks, putting government troops on the defensive.

But it is a hard campaign, an attritional struggle unlikely to meet Nato's timetable for an end to the war, especially with a further slowdown expected for Ramadan next month. The rebels are forced to consolidate their incrementalgains before they can think about moving forward.

The young men guarding the frontline post at Qawalish said Gaddafi's troops tried to retake it two days ago and subject them to a nightly bombardment of Grad rockets, peaking from 11.30pm to 4am.

"We are not scared," said a 21-year-old, who gave his name as Ahmed, half-an-hour after another rocket had thudded into the earth nearby. "We are OK, we just take these things, we get used to it. It's the Gaddafi army who's afraid."

Sitting on a wooden crate of ammunition and wearing a Valencia football shirt, army trousers and trainers, Ahmed said he was risking his life for two reasons: "Democracy. Freedom."

Qawalish fell to the rebels a week ago as, mile by mile, they gradually push from west to east along the mountain ridge. On the road to the frontline the Guardian saw a series of ghost towns which were home to thousands of residents during peacetime. There were wrecked shop fronts and petrol stations, abandoned mosques, concrete buildings blackened by fire, cars blown upside down and tanks and rocket launchers apparently destroyed by Nato air strikes.

Government soldiers who were not killed or captured during these battles appeared to have fled, leaving a trail of abandoned uniforms, boots and weapons still visible in the shade of trees where they once camped. Along roads the rebels used to move in on Qawalish, government forces planted 240 anti-personnel mines and 72 anti-tank mines, say Human Rights Watch.

The road passes through checkpoints that consist of mounds of earth and improvised road blocks: a plastic bin, car seat, tyre, gas canister and a dining chair.

At one a yellow fluorescent jacket was hoisted on a pole, arms outstretched like a scarecrow. At another, a painted sign said: "Welcome to Freedoom," which may or may not have been a misspelling. Revolutionary graffiti and the red, black and green colours of the rebels are everywhere.

The next major prize, about 30 miles away, is Gharyan, a heavily fortified city 60 miles south of Tripoli along a government-controlled road. A previous uprising in Gharyan was brutally crushed but it is believed that rebel sympathisers remain. Capturing it would sever a crucial supply route to the capital and could potentially break the will of Gaddafi's army. Colonel Juma Ibrahim, of the military council in western Libya, said: "Gharyan is the capital of the western mountains. When we finish Gharyan, all the western mountains are under our control. There is no other way to Tripoli."

Asked if his men were capable of taking Tripoli, Ibrahim insisted: "It will be so easy, more than Gharyan. We would have a clear road to Tripoli. I have contact with people around Tripoli, in Zawiya, Zuwarah and Al 'Aziziyah, and they are waiting for us. When we get to Gharyan, we can open many frontlines."

He added: "There will be an uprising in Tripoli. When we are near, they will think they can move."

Speaking in Zintan, a town that spent two months under siege but where the streets now bustle with rebel ordnance, Ibrahim gave an upbeat assessment of when the capital would fall. "Less than one month, inshallah."

But just as in Benghazi and Misrata, this is an ersatz army of former doctors, engineers, students, taxi drivers and teachers, in need of training and weapons. They are highly dependent on hardware captured from Gaddafi's forces, some of which they repair or upgrade with the help of technical manuals they find on the internet.

Al-Fitouri Muftah, a member of the local military council in Kikla, one of the closest towns to the frontline, warned: "We don't have enough weapons and bullets to capture Gharyan. We don't have anything except what we capture from the Gaddafi forces."

He estimated that one in 10 of the rebels' rifles had been passed down by grandparents who fought Italians in the Nafusa mountains. "The old weapons work OK," he said. "They're better than nothing."The 60-year-old, previously a government soldier, called on Nato to do more. "Nato's performance is weak. Nato is necessary for us to take Gharyan. If we don't get that support, it will be very difficult."

As Muftah spoke, the rumble of Nato planes overhead indicated that Gaddafi's troops would leave their positions and run for cover, affording Kikla a respite from enemy fire.

But shortly afterwards, when it appeared that Nato had left, the boom of another ordnance explosion could be heard from a nearby hill.

Muftah, treading on a dusty doormat that bore Gaddafi's face, said rockets still land on Kikla every day, including around 30 on Monday alone. "Gaddafi just wants to destroy the town," he said. "He wants to kill as many rebels as he can."