I don't care for those Spanner type wrenches commonly sold for the task.
Very easy to slip with those and damage the slots on the end cap.
Plus I've seen more than a few of those Brownells sold spanners with the teeth sheared/broken off.
The blade from a tri/combination square works good.
I put the blade in a bench vise so it's verticle and push the end of the forend with the cap into the blade so it won't slip. Then turn the entire forend to unscrew the cap.
They can be on pretty tight.
I made up a few spanner type tools to do the same.
I use a simple piece of steel pipe that fits over a magazine tube for the particular gun. On one end I cut it so there are the two teeth needed to engage the spanner cuts in the end cap.
Same idea as using the combo square blade..
I put the pipe spanner in a bench vise horizontal.
Slide a mag tube from any source that fits into the forend pretty close and then into the end of the open ended (pipe) spanner. This to center the end cap on the face of the spanner and helps you hold the forend assem square with the spanner so it won't slip off while turning it off or back on.
The teeth lock into the end cap. Push in on the forend assembly to engage securely and turn the cap loose.
Nothing slips out of engagement and the dis-assembly and re-assembly is quick and painless.
Works well for the 12,97,42 as well as Rem 31 & some others.
Once the end cap is off, the inner metal tube and op-rod will often be firmly still stuck inside the wooden forend.
Carefully pull and push the assembly to the rear and out of the wood.
The front edge of the metal cylinder where the end cap is threaded on to is very thin and the threads extra fine. Be very careful not to bend or damage those threads or the end cap will not go back on when you are ready. Lots of potential for cross-threading when re-installing especially if damaged threads.