DANAO, Philippines — In the remote, mist-covered slopes outside the city of Danao in the central Philippines sits the illegal, makeshift workshop of a master gun maker.

Accessible only by foot on a steep, winding pathway camouflaged by thick vegetation, the ramshackle shop owned by I. Launa has a tattered tarpaulin roof, a work table and several machines for cutting and shaping steel. The whole operation can be packed up and moved on short notice.

Illegal gun making is a livelihood that has helped put food on the table and send the family’s children to school since the 1970s, and Mr. Launa, who asked that only the initial of his first name be used for fear of being arrested, is just one of a host of such small-scale gunsmiths in the region. His village alone is home to about a dozen.

The trade — which contributes to the estimated two million unregistered guns in the Philippines, slightly more than the 1.7 million legally registered weapons — is able to flourish in a remote place where jobs are scarce, police presence is thin and lawlessness runs deep.