Infrared image dynamic range compression and detail enhancement can effectively improve the human ability of catching information in image's important details. It is an improtant research topic of infrared imaging technology. Because classical bilateral filter can not decompose the original image properly, we design a region-restrained bilateral filter and propose a method on infrared image dynamic range compression and detail enhancement. The method, firstly, decomposes the original infrared image into a base layer and a detail layer by the region-restrained bilateral filter. Secondly, the base layer is compressed and the detail layer is enhanced. Finally, the two parts are recombined and get the result image. The experimental results show that the filter can divide information of the original image more properly. Moreover, the proposed method can robustly compress the dynamic range and effectively enhance the details of different scales.