Nikon makes a "Reversing ring" - the BR-2A that has the same configuration as the camera end of the lens on one side and a 52mm male thread on the other. Screw the ring on the filter thread and then mount the lens by the adapter just as you would a regular lens. They also have a BR3 ring that then mounts to the exposed rear end of the lens for protection of the rear element. I'm not sure if you can thread a filter onto that one or not. The shorter the prime lens, the greater the magnification.
Mounting a lens in reverse to the front of a mounted lens using reverse mount rings as above is another great way to get macro shots. The big difference is in what you need for lenses. The image size on the sensor then becomes either the f/l of the mounted lens divided by the focal length of the reversed lens, or just the opposite - the f/l of the reversed lens divided by the f/l of the mounted lens.