The complex dielectric permittivity epsilon(*) values are presented for aerosil-dispersed 4-pentyl-4(')-cyanobiphenyl (5CB) confined in Anopore membranes. The dielectric permittivities are measured in the frequency range from 10(-2) Hz to 1 GHz at temperatures ranging from 50 degrees C down to -20 degrees C. In bulk 5CB, which has only a nematic phase, there exist two main relaxation processes: one due to the rotation of molecules around their short axes for parallel orientation of the director to the probing field and another fast relaxation process due to the librational motion of molecules for perpendicular orientation. Inside Anopore membranes both these main relaxation processes can be observed, but with subtle differences. The relaxation process due to the rotation of molecules around the short axis is faster in Anopores at all temperatures in comparison with the bulk process. Hydrophilic aerosil particles, when dispersed in the liquid-crystal (LC) phase, attach to each other via hydrogen bonds and form a three-dimensional interconnecting aerosil network, thus dividing the LC phase into small domains. Dispersing 5CB with different concentrations of hydrophilic aerosils leads to a decrease in relaxation time with aerosil concentration. In these dispersed systems a slow additional relaxation process emerges. This slow process becomes stronger with higher concentrations of aerosil. From our experiments we conclude that this process is the relaxation of 5CB molecules homeotropically aligned to the surface of the aerosil particles. In the case of 5CB-aerosil dispersions enclosed in Anopore membranes this slow process still exists and increases also with aerosil concentration. The relaxation time of the rotation of the 5CB molecules around their short axis systematically increases in these 5CB-aerosil samples in Anopore membranes with aerosil concentration from the 5CB-Anopore behavior towards the behavior observed for 5CB-aerosil dispersions. We explain the evolution as resulting from opposing tendencies from size effects (in the Anopore membranes) and disorder effects (in the aerosil dispersions).