We design optimal interferometric schemes for implementation of two-qubit linear optical quantum filters diagonal in the computational basis. The filtering is realized by interference of the two photons encoding the qubits in a multiport linear optical interferometer, followed by conditioning on presence of a single photon in each output port of the filter. The filter thus operates in the coincidence basis, similarly to many linear optical unitary quantum gates. Implementation of the filter with linear optics may require an additional overhead in terms of reduced overall success probability of the filtering and the optimal filters are those that maximize the overall success probability. We discuss in detail the case of symmetric real filters and extend our analysis also to asymmetric and complex filters.