The guns aren't his only lines of defense.
Mr. Mateychenko has sandbagged the doors and the windows to the town hall and posted machine gunners at the entrances.
His soldiers stand guard at roadblocks at the town's perimeter, and a battery of missile launchers has been firing at a village a few miles away, to which the rebels had retreated.
The thud of the bombardment is audible in Mr. Mateychenko's office, where he answers the phone calls from residents who complain about the lack of electricity, water and food.
"Some people are frightened, some are worried, sometimes there is shooting, sometimes explosions," he said.
When one caller complains that the lights have gone out in his neighborhood, Mr. Mateychenko's advice is to "just endure it."
Ukraine resumed its offensive against thousands of rebels in its eastern provinces this past week.
Any success means that local governments must be re-established—a task that is falling to military commanders like Mr. Mateychenko, who are performing without much of a road map.
The task could grow in the weeks ahead, as Ukrainian forces push into population centers of Donetsk and Luhansk provinces, where nearly seven million people live, some of them deeply hostile to the central government in Kiev.
President Petro Poroshenko said Friday that he had proposed a time and place for new peace talks between representatives of the government in Kiev and the militants, to be held Saturday.
He said he hadn't received a response, but rebels separately indicated they could be prepared to meet in the Belarusian capital of Minsk.
Ukrainian forces, meanwhile, said nine servicemen were killed Friday and 13 injured in fighting across the region, as troops advanced toward two rebel strongholds of Slavyansk and Luhansk city.
The Ukrainian army has been slowly encircling Slavyansk, an industrial hub of 120,000 about 6 miles from Krasniy Lyman.
The fierce fighting is making the task of winning hearts of people tougher.
Residents fleeing Slavyansk say that apartment blocks have been shattered by Ukrainian military firing at rebels.
For weeks, thousands have been living without water or electricity.
Most of those who have fled, officials say, appear to have gone deeper into rebel-held territory or to Russia itself.
Mr. Mateychenko, a former politician from Donetsk province, puts a brave face on his efforts to tackle resistance in Krasniy Lyman, a bucolic town of about 30,000 people.
The town voted heavily along with others in the region for independence from Ukraine this spring.
The presence of his battalion here, made up of mostly local recruits but trained and equipped by an oligarch, Ihor Kolomoisky, from the neighboring province of Dnipropetrovsk, raises the hackles of some residents.
But Mr. Mateychenko said the battalion answers to the government only, not Mr. Kolomoisky, and that many local residents have expressed relief that they are keeping order.
He said there are no supporters of rebels in town now.
Rebel leaders, he said, alienated people during their short reign "with their banal banditry, looting and robbery."
"We have no underground resistance here," he said.
He reassures residents that the rebels won't be coming back "because I've said the only way I'll leave here is feet first."
But outside town hall, residents along quiet, tree-lined streets of one-story houses tell a different tale.
Inside a deserted bakery, women says in hushed voices that many of the men are with the rebels.
"The men who fought all ran for the woods," said one.
"Take a look — there are no men on street."
She refuses to give her name, pointing to an advertisement on the wall urging residents to call a "hotline for the fight with banditry and separatism" to report anyone with the wrong opinions.
Ukraine's security services rounded up some men in the town who served in the rebel militia, said another woman.
"Now people are reporting on each other."
The fight for Krasniy Lyman was costly for both sides.
Mr. Mateychenko's battalion began attacking early last month and stormed through a roadblock with armored troop carriers, some of which were blown up by rebels with antitank weapons.
Eight of his men were killed.
Most of the town was untouched by fighting, but some mortar rounds landed inside a bread factory and at a hospital, where it killed one doctor and wounded another.
Residents say it was the Ukrainian troops who shelled the hospital.
The Ukrainian government said it is investigating.
Mr. Mateychenko's men said they are cooperating, and provided security as a Russia-based human rights group, Memorial, sent a representative to the hospital to interview the staff.
One of Mr. Mateychenko's men recorded him in front of a shrapnel-scarred wall of the hospital as he explained that his group likewise documented how the civilian population of Chechnya suffered in the 1990s during Russia's military operation against separatists in the North Caucasus.
Source: The Wall Street Journal