We present a frequency stabilized laser at 2051 nm based on a versatile all-fibered stabilization setup. A modulation sideband locking technique is implemented to lock the laser at a controlled frequency detuning from the center of the CO2 R(30) transition envisaged for space-borne differential absorption lidar (DIAL) applications. This method relies on the use of a compact all-fibered gas reference cell that makes the setup robust and immune to mechanically induced optical misalignments. The gas cell is fabricated using a hollow-core photonic crystal fiber filled with pure CO2 at a low pressure of ~20 mbar and hermetically sealed at both ends by splices to silica fibers. Different configurations of this fibered cell have been developed and are presented. With this technique, frequency stabilities below 40 kHz at 1-s integration time and <100 kHz up to 1000-s averaging time were achieved for a laser detuning by around 1 GHz from the center of the CO2 transition. These stabilities are compliant with typical requirements for the reference seed source for a space CO2 DIAL.