Topological defects of nematic liquid crystals confined in porous networks