The receiver has two shoulders - one internal, one external. Have a good look at the barrelled action, you will be able to tell if the barrel has contact at both. No. 4s use the external shoulder, 98 Mausers, the internal.
If the barrel coming off is a scrapper, cut a relief groove just in front of the receiver ring; this will ease off some of the torque. Again, if it is utter junk, grab the breech of the barrel with a pipe wrench. Hold the receiver in a good fitting wrench, you don't want to tweak it.
In theory, a No. 4 barrel pulls up about 14 degrees before top dead centre, and uses about 120 ft.lbs of torque to index.
If your replacement barrel doesn't index, a lathe and perhaps a reamer are going to be needed. If it indexes, but headspace is off, you will need either a reamer, or a sack of boltheads.