UN leader Ban Ki-moon came under a brief shower of shoes as he entered Hamas-run Gaza on Thursday, hours after a barrage of rockets was fired from the territory into Israel.

As the UN chief entered the Palestinian territory, protesters threw shoes, sand and small stones at his convoy, which was briefly held up before continuing on to Khan Yunis in the southern Gaza Strip.

A crowd of around 50 demonstrators, most of them relatives of Palestinians in Israeli jails, said they were protesting the fact that Ban was not meeting with them or Palestinian prisoner groups during his brief trip to Gaza.

The UN chief's first stop in the territory was at the Amal (Hope) school in Khan Yunis, with a visit to a Japanese-funded housing project also on the agenda.

He is not scheduled to meet with any member of the Hamas-run government.

UN security decided to go ahead with the trip despite a barrage of eight rockets fired into southern Israel from Gaza on Wednesday night.

Israel and the militant groups in Gaza maintain an informal truce, but rockets are periodically fired from the territory, usually causing no damage or injuries, prompting retaliatory attacks by Israeli forces.

On Wednesday, after meeting with Israeli Prime Minister Benjamin Netanyahu, Ban condemned rocket attacks from Gaza as "unacceptable" and said he had discussed the delicate informal truce.

"I shared with him my concerns about the fragility of the calm and stressed that continued rocket attacks out of Gaza must stop," Ban said, adding that he remained concerned about Israel's restrictions on the territory.

Israel closely limits imports and exports from Gaza, citing security concerns and the need to deny Hamas, which it considers a terrorist organisation, access to weapons and money.

But much of the international community has said the restrictions negatively affect Gaza's entire population, unfairly affecting civilians.

"Gaza remains a priority for me and the United Nations family," Ban said on Wednesday, after meeting with Netanyahu.

"I thus urged the prime minister to take further steps to facilitate the delivery of the United Nations' important humanitarian and development assistance in the service of the Gazan people."

Netanyahu did not directly mention Gaza on Wednesday but stressed that Israelis must be protected from "terror."

Ban's trip to Gaza comes as part of a visit to Israel and the Palestinian territories intended to convince the two sides to continue meeting, as the international community seeks a way to kickstart direct negotiations.

He arrived in the region shortly after five rounds of so-called exploratory meetings between Israeli and Palestinian negotiators ended without an agreement on a path back to direct talks, which have been on hold since September 2010.

On Wednesday, he urged Israel to offer "goodwill gestures" to the Palestinians to lure them back to talks.

But his call for Israel to halt settlement construction, a key Palestinian demand, appeared to be rebuffed by Netanyahu, who said Wednesday he considered settlements an issue for discussion during negotiations, not before.