Attenuating light source via glLight methods?

Is it possible to easily implement attenuating light (you have moving objects or light source, and as they get further from each other, the object becomes darker)?

The way I understand it is, if an object has a face that is facing the light source it will be fully lit no matter distance. Can I change this?