For this, you need to:
- Convert the pitch of the vocal track into a control signal (CV or CC or some other kind signal).
- Route that control signal to the appropriate controls of the filter.
Some plugins can do this internally. they have a pitch follower or pitch tracking feature that can use the pitch of a signal to control the plugin's parameters.
Take a look this video from MeldaProduction, about the "Pitch Mode" modulator built into many of their plugins:
- The the video is kinda complicated. I couldn't easily find a more straightforward one.
- The video shows how to use the pitch of the incoming signal to control the plugin's parameters. You want to use a different signal, and the video doesn't show that.
The Melda plugins (and likely most others that have pitch trackers) allow you to use a "sidechain" signal to control some of the parameters. So (using MeldaProduction's MFilter as an example)
- Add MFilter to your distorted guitar track.
- Route the vocal track into the plugin's sidechain.
- Configure a "pitch mode" modulator that follows the sidechain's pitch and controls the frequency and gain of one or more of the filter's frequency bands.
Configuring the pitch tracker to pick out the exact frequencies may or may not be easy to do.
There are probably also separate pitch tracking plugins that can convert pitch into control signals, which you can then connect (using your DAW's routing features) to control a simple filter or EQ plugin.