Answer
I say, and with God's help: In itself, it is not forbidden if we are in a legitimate war against an enemy, for we have the right to fight him in defense of our religion, our lives, our lands, our honor, and our wealth with all that we can. However, if it is in an illegitimate war, such as what happens among Muslims, or what is done by extremist groups, then it is not permissible, and the one who commits it bears a great sin for killing himself and for killing innocent Muslims. And God knows best.