I had an extremely hard time locating mine, so I'm trying to tell it's location better. Open the hood and looking from the front of the car near the rear of the engine on the drivers side you will see two cables that open the throttle. Looking from the front of the car, the knock sensor is located under the bare part of the left cable. It's extremely hard to see and requires a 12 mm socket and more than a six inch extension (I used a six and three inch extension) and ratchet. The socket and extension will fit between the cables just keep in mind the bolt (looking from the front) will be just a tad to the left with the extension inserted between the cables. I also removed the air box that was clamped to the intake manifold to swap the sensor out to get easier access to the wire connection.
In a 1998 Subaru Legacy, the knock sensor is located on the top of the engine block and to the left of the engine. More specifically, it is under the left rear intake manifold runner.
It is located on the engine block drivers side.
The knock sensor is located near the idle air control solenoid valve on a 2001 Subaru Forester. The knock sensor is responsible for sensing vibrations caused by engine knock.
Knock sensor/vibration sensor
It is threaded into the block, under the intake manifold.
Its on top of the engine by the fuel injection (remove the air intake first). Need a 10mm socket with a long extention.
Where is the knock sensor located on a 1999 Subaru Forester?
Belt was probably installed incorrectly. Take it back and have them check it.
that the knock sensor does
That depends entirely on what happened to it to make it need repairing.
It is underneath the intake manifold. If you look straight down from your throttle body, you will see a sensor with one wire coming out and a bolt going through the middle of it, that is the knock sensor.
You can find the knock sensor on the top side of the engine under the intake manifold. It is easiest to find from the driver's side and is at the back of the engine block.