Many certified aircraft have a FLEXIBLE attachment where the exhaust pipe exits under the firewall. Go look at a Cirrus. Depending on year, many use springs towards the back to support the pipe. It relieves weight, but lets the pipe shake rattle and roll as the engine does the same. Works fine. Other certified aircraft use a rubber coupling with metal fittings at the end to do the same thing, same as is common in automobile exhaust systems.
But Paul is right: never attach it rigidly to anything but the engine.
Fred