  The S254-258 star-forming complex is a place of massive star formation where
five OB-stars have created HII regions, visible as optical nebulae, and
disrupted the parental molecular gas. In this work, we study the 3D structure
of these \HII regions using optical spectroscopy and tunable-filter photometry
with the 6-m and 1-m telescopes of the Special Astrophysical Observatory of the
Russian Academy of Sciences. We construct maps of the optical extinction, and
find that the HII emission is attenuated by neutral material with $2 \leq A_V
\leq 5$ mag. The typical electron density in S255, and S257 is $\approx 100$
cm$^{-3}$, with enhancements up to 200 cm$^{-3}$ in their borders, and up to
400 cm$^{-3}$ toward the dense molecular cloud between them, where active star
formation is taking place. We show that either a model of a clumpy dense
neutral shell, where UV~photons penetrate through and ionize the gas, or a
stellar wind, can explain the shell-like structure of the ionized gas. S255 is
surrounded by neutral material from all sides, but S257 is situated on the
border of a molecular cloud and does not have dense front and rear walls. The
compact HII regions S256 and S258 are deeply embedded in the molecular clouds.
