HCN channels are activated by membrane hyperpolarization and regulated by cyclic nucleotides, such as cyclic adenosine-mono-phosphate (cAMP). Here we present structural models of the pore region of these channels obtained by using homology modeling and validated against spatial constraints derived from electrophysiological experiments. For the construction of the models we make two major assumptions, justified by electrophysiological observations: i), in the closed state, the topology of the inner pore of HCN channels is similar to that of K(+) channels. In particular, the orientation of the S5 and S6 helices of HCN channels is very similar to that of the corresponding helices of the K(+) KcsA and K(+) KirBac1.1 channels. Thus, we use as templates the x-ray structure of these K(+) channels. ii), In the open state, the S6 helix is bent further than it is in the closed state, as suggested (but not proven) by experimental data. For this reason, the template of the open conformation is the x-ray structure of the MthK channel. The structural models of the closed state turn out to be consistent with all the available electrophysiological data. The model of the open state turned out to be consistent with all the available electrophysiological data in the filter region, including additional experimental data performed in this work. However, it required the introduction of an appropriate, experimentally derived constraint for the S6 helix. Our modeling provides a structural framework for understanding several functional properties of HCN channels: i), the cysteine ring at the inner mouth of the pore may act as a sensor of the intracellular oxidizing/reducing conditions; ii), the bending amplitude of the S6 helix upon gating appears to be significantly smaller than that found in MthK channels; iii), the reduced ionic selectivity of HCN channels, relative to that of K(+) channels, may be caused, at least in part, by the larger flexibility of the inner pore of HCN channels.