The frequency-response-masking (FRM) technique is one of the most efficient approaches to the design of narrow transition band FIR filters. The constrained minimax design of linear-phase FRM FIR filters in the frequency domain is considered in this paper. The corresponding optimization problem is a nonconvex one. To deal with the nonconvex design problem and improve the FRM filter performance, we propose an algorithm to alternately optimize different subsets of the design variables by fixing the remaining ones. In this way, the nonconvex optimization problem is converted into a series of linear programming subproblems defined on different frequency bands, which are then solved alternately and iteratively. Moreover, the new algorithm converges to a better FRM filter than those obtained by several competitive methods and is flexible to incorporate linear constraints in the design. Several design examples are provided to demonstrate the advantages of the proposed algorithm.