We discuss the feasibility of the detection of the 21 cm forest in the diffuse intergalactic medium (IGM) with the radio telescope LOFAR. The optical depth to the 21 cm line has been derived using simulations of reionization which include detailed radiative transfer of ionizing photons. We find that the spectra from reionization models with similar total comoving hydrogen ionizing emissivity but different frequency distribution look remarkably similar. Thus, unless the reionization histories are very different from each other (e.g. a predominance of UV versus X-ray heating) we do not expect to distinguish them by means of observations of the 21 cm forest. Because the presence of a strong X-ray background would make the detection of the 21 cm line absorption impossible, the lack of absorption could be used as a probe of the presence/intensity of the X-ray background and the thermal history of the Universe. Along a random line of sight LOFAR could detect a global suppression of the spectrum from z greater than or similar to 12, when the IGM is still mostly neutral and cold, in contrast with the more well-defined, albeit broad, absorption features visible at lower redshift. Sharp, strong absorption features associated with rare, high-density pockets of gas could also be detected at z similar to 7 along preferential lines of sight.